blob: b28b18951dd132236f0e964533cb355f901434d1 [file] [log] [blame]
Lode Vandevenneb50b7ef2013-01-16 10:30:56 +01001Zopfli Compression Algorithm is a compression library programmed in C to perform
2very good, but slow, deflate or zlib compression.
3
Lode Vandevenne4975aa52013-04-25 16:00:01 +02004The basic function to compress data is ZopfliCompress in zopfli.h. Use the
5ZopfliOptions object to set parameters that affect the speed and compression.
6Use the ZopfliInitOptions function to place the default values in the
7ZopfliOptions first.
Lode Vandevenneb50b7ef2013-01-16 10:30:56 +01008
Lode Vandevenne4975aa52013-04-25 16:00:01 +02009ZopfliCompress supports deflate, gzip and zlib output format with a parameter.
10To support only one individual format, you can instead use ZopfliDeflate in
11deflate.h, ZopfliZlibCompress in zlib_container.h or ZopfliGzipCompress in
12gzip_container.h.
Lode Vandevenneb50b7ef2013-01-16 10:30:56 +010013
Lode Vandevenne4975aa52013-04-25 16:00:01 +020014ZopfliDeflate creates a valid deflate stream in memory, see:
Lode Vandevenned5eb5f52013-02-14 14:41:44 +010015http://www.ietf.org/rfc/rfc1951.txt
Lode Vandevenne4975aa52013-04-25 16:00:01 +020016ZopfliZlibCompress creates a valid zlib stream in memory, see:
Lode Vandevenned5eb5f52013-02-14 14:41:44 +010017http://www.ietf.org/rfc/rfc1950.txt
Lode Vandevenne4975aa52013-04-25 16:00:01 +020018ZopfliGzipCompress creates a valid gzip stream in memory, see:
Lode Vandevenned5eb5f52013-02-14 14:41:44 +010019http://www.ietf.org/rfc/rfc1952.txt
Lode Vandevenneb50b7ef2013-01-16 10:30:56 +010020
21This library can only compress, not decompress. Existing zlib or deflate
22libraries can decompress the data.
23
Lode Vandevenne4975aa52013-04-25 16:00:01 +020024zopfli_bin.c is separate from the library and contains an example program to
25create very well compressed gzip files. Currently the makefile builds this
26program with the library statically linked in.
27
Lode Vandevenne337d27f2013-05-07 15:17:00 +020028To build the binary, use "make". To build the library as a shared Linux library,
29use "make libzopfli". The source code of Zopfli is under src/zopfli.
30
Lode Vandevenneb50b7ef2013-01-16 10:30:56 +010031Zopfli Compression Algorithm was created by Lode Vandevenne and Jyrki
32Alakuijala, based on an algorithm by Jyrki Alakuijala.