Zopfli
Sign in to saveZopfli is a data compression library that performs deflate, gzip and zlib data encoding. It achieves higher compression ratios than mainstream Deflate and zlib implementations at the cost of being slower. Google first released Zopfli in February 2013 under the terms of Apache License 2.0. Google archived the project in October 2025.
Source code
The basic function to compress data is ZopfliCompress in zopfli.h. Use the ZopfliOptions object to set parameters that affect the speed and compression. Use the ZopfliInitOptions function to place the default values in the ZopfliOptions first. ZopfliCompress supports deflate, gzip and zlib output format with a parameter. To support only one individual format, you can instead use ZopfliDeflate in deflate.h, ZopfliZlibCompress in zlib container.h or ZopfliGzipCompress in gzip container.h. This library can only compress, not decompress. Existing zlib or deflate libraries can decompress the data. zopfli bin.c is separate from the library and contains an example program to create very well compressed gzip files. Currently the makefile builds this program with the library statically linked in. A makefile is provided as well, but only for linux. Use "make" to build the binary, "make libzopfli" to build it as a shared library. For other platforms, please use the build instructions above instead. Zopfli Compression Algorithm was created by Lode Vandevenne and Jyrki Alakuijala, based on an algorithm by Jyrki Alakuijala.
Excerpt from the source-code README · 1,856 chars · not written by Vinony
Wikidata facts
- Official website
- github.com/google/zopfli
- Image
- ZopfliPNG screenshot.png
Show 3 more facts
- source code repository URL
- github.com/google/zopfli
- software version identifier
- 1.0.3
- Commons category
- ZopfliPNG
Sources (3)
via Wikidata · CC0
~3 min read
Article
5 sectionsContents
- Operation
- History
- See also
- References
- External links
Zopfli is a data compression library that performs deflate, gzip and zlib data encoding. It achieves higher compression ratios than mainstream Deflate and zlib implementations at the cost of being slower. Google first released Zopfli in February 2013 under the terms of Apache License 2.0. Google archived the project in October 2025.
The name Zöpfli is the Swiss German diminutive of “Zopf”, an unsweetened type of Hefezopf.