1
votes

I know that gzip supports 9 compression levels, from fast to strong. The decompression algorithm does not care about the compression level at all. Is it possible to reach a "higher" level than 9 by another tool than the common gzip application? I mean, someone could have created a modified gzip compressor which is more effective than gzip level 9.

The background is that I have a webserver which hosts compressed gz files. It would be nice to reduce the sizes of those files and I do not care how long my server has to work in order to reduce those files even by 1 byte at the end. It is a one-time task, so it does not matter.

Is there something like a hacked version of gzip supporting higher levels or offering higher compression?

1
If it's hacked then it stops being GZip and is custom and then both ends need to support it. If you control both ends you're free to use whatever algorithm you see fit.Lloyd
No, you can "hack" the compressor without "hacking" the format, so that it is still decompressible with gzip on the other end.Mark Adler

1 Answers

2
votes

Yes. It's called zopfli. It is painfully slow, but will compress about 5% better than zlib level 9. zopfli is built in to pigz, which is a gzip equivalent that makes use of multiple processors and cores. Compression level 11 in pigz invokes the zopfli compressor. (pigz goes up to 11. Get it?) Using multiple cores on large inputs helps mitigate the slowness of zopfli.