README 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. Zopfli Compression Algorithm is a compression library programmed in C to perform
  2. very good, but slow, deflate or zlib compression.
  3. The basic function to compress data is ZopfliCompress in zopfli.h. Use the
  4. ZopfliOptions object to set parameters that affect the speed and compression.
  5. Use the ZopfliInitOptions function to place the default values in the
  6. ZopfliOptions first.
  7. ZopfliCompress supports deflate, gzip and zlib output format with a parameter.
  8. To support only one individual format, you can instead use ZopfliDeflate in
  9. deflate.h, ZopfliZlibCompress in zlib_container.h or ZopfliGzipCompress in
  10. gzip_container.h.
  11. ZopfliDeflate creates a valid deflate stream in memory, see:
  12. http://www.ietf.org/rfc/rfc1951.txt
  13. ZopfliZlibCompress creates a valid zlib stream in memory, see:
  14. http://www.ietf.org/rfc/rfc1950.txt
  15. ZopfliGzipCompress creates a valid gzip stream in memory, see:
  16. http://www.ietf.org/rfc/rfc1952.txt
  17. This library can only compress, not decompress. Existing zlib or deflate
  18. libraries can decompress the data.
  19. zopfli_bin.c is separate from the library and contains an example program to
  20. create very well compressed gzip files. Currently the makefile builds this
  21. program with the library statically linked in.
  22. The source code of Zopfli is under src/zopfli. Build instructions:
  23. To build zopfli, compile all .c source files under src/zopfli to a single binary
  24. with C, and link to the standard C math library, e.g.:
  25. gcc src/zopfli/*.c -O2 -W -Wall -Wextra -Wno-unused-function -ansi -pedantic -lm -o zopfli
  26. A makefile is provided as well, but only for linux. Use "make" to build the
  27. binary, "make libzopfli" to build it as a shared library. For other platforms,
  28. please use the build instructions above instead.
  29. Zopfli Compression Algorithm was created by Lode Vandevenne and Jyrki
  30. Alakuijala, based on an algorithm by Jyrki Alakuijala.