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

Test alg_comp fails when using a different zlib implementation #142

Closed
tuliom opened this issue Dec 6, 2023 · 0 comments · Fixed by #143
Closed

Test alg_comp fails when using a different zlib implementation #142

tuliom opened this issue Dec 6, 2023 · 0 comments · Fixed by #143

Comments

@tuliom
Copy link
Contributor

tuliom commented Dec 6, 2023

While trying to use zlib-ng I noticed that test alg_comp fails with the following message:

stderr:
alg_comp: ../tests/alg_comp.c:71: test: Assertion `len == ol' failed.

I imagine the same issue would happen when using other zlib implementations, e.g. QATzip or libnxz.
This happens because deflate does not guarantee the same output.

Different deflate implementations may provide different compressed output.

tuliom added a commit to tuliom/jose that referenced this issue Dec 6, 2023
Different zlib implementations such as zlib-ng, QATzip and libnxz
provide API and ABI compatibility with madler's zlib. However, they do
not guarantee identical output.
This makes it very hard to compare the length or binary output of a
compressed stream.

Instead of doing that, this patch aims to compare the input against the
output of a compression and decompression cycle.

Fixes latchset#142.
tuliom added a commit to tuliom/jose that referenced this issue Dec 7, 2023
Different zlib implementations such as zlib-ng, QATzip and libnxz
provide API and ABI compatibility with madler's zlib. However, they do
not guarantee identical output.
This makes it very hard to compare the length or binary output of a
compressed stream.

Instead of doing that, this patch aims to compare the input against the
output of a compression and decompression cycle.

Fixes latchset#142.
sergio-correia pushed a commit that referenced this issue Dec 18, 2023
Different zlib implementations such as zlib-ng, QATzip and libnxz
provide API and ABI compatibility with madler's zlib. However, they do
not guarantee identical output.
This makes it very hard to compare the length or binary output of a
compressed stream.

Instead of doing that, this patch aims to compare the input against the
output of a compression and decompression cycle.

Fixes #142.
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

Successfully merging a pull request may close this issue.

1 participant