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

ZopFli ZLIB mode sets the wrong fLevel byte in ZLIB header #42

Open
GoogleCodeExporter opened this issue Mar 9, 2015 · 3 comments
Open

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Run zopfli -zlib
2. Examine second byte of output
3. It's 01, indicating minimal compression

What is the expected output? What do you see instead?

Expect that maximal compression value is shown.

zlibcontainer.c line 56 is:

  unsigned flevel = 0;

should be:

   unsigned flevel = 3;

https://www.ietf.org/rfc/rfc1950.txt

FLEVEL (Compression level)
These flags are available for use by specific compression
methods.  The "deflate" method (CM = 8) sets these flags as
follows:

   0 - compressor used fastest algorithm
   1 - compressor used fast algorithm
   2 - compressor used default algorithm
   3 - compressor used maximum compression, slowest algorithm

Original issue reported on code.google.com by bay...@gmail.com on 13 Oct 2014 at 2:54

@lvandeve
Copy link
Collaborator

Fixed :)

@ghost
Copy link

ghost commented Feb 22, 2016

zopflipng/lodepng/lodepng.cpp also uses flevel 0.

@lvandeve lvandeve reopened this Feb 22, 2016
@lvandeve
Copy link
Collaborator

Good point, thanks. Reopened

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

No branches or pull requests

2 participants