Before there was a bug when compress was called with
Z_FINISH if the destination buffer was not big enough.
It would only keep looping while avail_in > 0. However,
it needs to check for Z_STREAM_END to ensure that the
compressed buffer is actually finished.
Before there was a bug when compress was called with
Z_FINISH
if the destination buffer was not big enough. It would only keep looping whileavail_in > 0
. However, it needs to check forZ_STREAM_END
to ensure that the compressed buffer is actually finished.