zlib/examples
Mark Adler d00c147f53 Clarify that prefix codes are counted in enough.c.
There is no assurance that all prefix codes are reachable as
optimal Huffman codes for the numbers of symbols encountered in
a deflate block. This code considers all possible prefix codes,
which might be a larger set than all possible Huffman codes,
depending on the constraints.
2018-08-05 23:08:25 -07:00
..
enough.c Clarify that prefix codes are counted in enough.c. 2018-08-05 23:08:25 -07:00
fitblk.c zlib 1.2.2.4 2011-09-09 23:24:52 -07:00
gun.c Fix some typos. 2016-10-30 08:49:01 -07:00
gzappend.c Avoid an undefined behavior of memcpy() in gzappend(). 2017-10-12 19:27:59 -07:00
gzjoin.c Clean up examples/gzjoin.c for z_const usage. 2012-08-14 00:30:44 -07:00
gzlog.c zlib 1.2.9 2016-12-31 23:37:10 -08:00
gzlog.h Clean up examples/gzlog.[ch] comparisons of different types. 2012-08-18 18:07:04 -07:00
README.examples Move example.c and minigzip.c to test/. 2011-11-27 14:15:32 -08:00
zlib_how.html zlib 1.2.3.1 2011-09-09 23:25:27 -07:00
zpipe.c zlib 1.2.3.1 2011-09-09 23:25:27 -07:00
zran.c Fix some typos. 2016-10-30 08:49:01 -07:00

This directory contains examples of the use of zlib and other relevant
programs and documentation.

enough.c
    calculation and justification of ENOUGH parameter in inftrees.h
    - calculates the maximum table space used in inflate tree
      construction over all possible Huffman codes

fitblk.c
    compress just enough input to nearly fill a requested output size
    - zlib isn't designed to do this, but fitblk does it anyway

gun.c
    uncompress a gzip file
    - illustrates the use of inflateBack() for high speed file-to-file
      decompression using call-back functions
    - is approximately twice as fast as gzip -d
    - also provides Unix uncompress functionality, again twice as fast

gzappend.c
    append to a gzip file
    - illustrates the use of the Z_BLOCK flush parameter for inflate()
    - illustrates the use of deflatePrime() to start at any bit

gzjoin.c
    join gzip files without recalculating the crc or recompressing
    - illustrates the use of the Z_BLOCK flush parameter for inflate()
    - illustrates the use of crc32_combine()

gzlog.c
gzlog.h
    efficiently and robustly maintain a message log file in gzip format
    - illustrates use of raw deflate, Z_PARTIAL_FLUSH, deflatePrime(),
      and deflateSetDictionary()
    - illustrates use of a gzip header extra field

zlib_how.html
    painfully comprehensive description of zpipe.c (see below)
    - describes in excruciating detail the use of deflate() and inflate()

zpipe.c
    reads and writes zlib streams from stdin to stdout
    - illustrates the proper use of deflate() and inflate()
    - deeply commented in zlib_how.html (see above)

zran.c
    index a zlib or gzip stream and randomly access it
    - illustrates the use of Z_BLOCK, inflatePrime(), and
      inflateSetDictionary() to provide random access