Skip to content

Commit a2b5cd9

Browse files
committed
Add additional base case to allow allocating the exact size as the limit
1 parent 7bf564c commit a2b5cd9

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/data_compressor.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,11 @@ class DataCompressor {
311311
"encountered inconsistent stream state during "
312312
"decompression");
313313
}
314+
// Break if decompression is complete, even if buffer is exactly
315+
// full
316+
if (ret == Z_STREAM_END) {
317+
break;
318+
}
314319
} while (stream.avail_out == 0);
315320
}
316321
// Make sure the last buffer is committed

0 commit comments

Comments
 (0)