-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Describe the bug
So I tried to do local unit tests and I discovered a regression in how the library compresses and it stated somewhere.
What happens is that at any compression level, the generated outputs is always the same on a file as if I specified no compression with the zlib header and footer attached to the zlib stream.
To Reproduce
Steps to reproduce the behavior:
- Have a file you want to compress.
- Call one of the helper compression functions (with an optional compression level, the ones that do not have the level argument uses ZDefaultCompression)
- Analyze the contents, compare it with the outputs from the native C implementation that @madler owns at the same compression level.
- Observe the outputs are different.
Expected behavior
What is expected is for the outputs to match what is in the C implementation.
Actual behavior
What actually happens is that somehow the direct file's contents looks to not be changed at all and then what happens is that the only changes is the zlib header appended at the beginning of the file and the footer at the end.
Screenshots
N/A
Version used
The latest main branch.
Additional context
N/A