Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

deflate error Z_BUF_ERROR for particular input data for compression level 1 only #12

Open
yanqi27 opened this issue Mar 3, 2016 · 2 comments

Comments

@yanqi27
Copy link

yanqi27 commented Mar 3, 2016

This seems related to issue 10. I tested branch "issue10" which doesn't solve the error. I could narrow down the issue to a small test. please see the attached code and binary input data. The following command will show the problem.
$a.out image_dd
rc=Z_BUF_ERROR`` Failedto compress the input file at offset 0x0

zlib_bug.zip

@jtkukunas
Copy link
Contributor

Hi yanqi27,

Thanks for the bug report and test case.

Looking through your test case, I don't think this is related to issue #10. The compress2() function returns Z_BUF_ERROR when the destination buffer isn't large enough. You're using compressBound() to determine the destination buffer size, so it looks like this function isn't calculating the correct upper bound for the new level 1 strategy.

@arskama
Copy link

arskama commented Aug 16, 2019

Hi, Jim,

Is this considered to be a bug?

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

No branches or pull requests

3 participants