Fix fallback compression handler

This commit is contained in:
Shane Freeder 2025-01-17 15:10:06 +00:00
parent c0fdf20224
commit 71feb11b2e
No known key found for this signature in database
GPG Key ID: A3F61EA5A085289C

View File

@ -57,7 +57,8 @@ public class JavaVelocityCompressor implements VelocityCompressor {
inflater.setInput(source.nioBuffer());
try {
while (!inflater.finished() && inflater.getBytesWritten() < uncompressedSize) {
final int readable = source.readableBytes();
while (!inflater.finished() && inflater.getBytesRead() < readable) {
if (!destination.isWritable()) {
destination.ensureWritable(ZLIB_BUFFER_SIZE);
}