Netflix-Skunkworks / spectatord

A high performance metrics daemon
Apache License 2.0
24 stars 5 forks source link

ensure compressed buffer is finished #39

Closed brharrington closed 3 years ago

brharrington commented 3 years ago

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.