Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compression regression in code. #176

Open
AraHaan opened this issue Aug 16, 2021 · 1 comment
Open

Compression regression in code. #176

AraHaan opened this issue Aug 16, 2021 · 1 comment

Comments

@AraHaan
Copy link

AraHaan commented Aug 16, 2021

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:

  1. Have a file you want to compress.
  2. Call one of the helper compression functions (with an optional compression level, the ones that do not have the level argument uses ZDefaultCompression)
  3. Analyze the contents, compare it with the outputs from the native C implementation that @madler owns at the same compression level.
  4. 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

@AraHaan
Copy link
Author

AraHaan commented Aug 19, 2021

The 2 failing tests (which was finally made to skip themselves on failure) in #177 exposes how they are regressed.

As for where, I have no clue as of yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant