Skip to content

Compression regression in code. #176

@AraHaan

Description

@AraHaan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions