xref: /netbsd-src/external/gpl3/gdb.old/dist/zlib/examples/README.examples (revision 6881a4007f077b54e5f51159c52b9b25f57deb0d)
14e00368fSchristosThis directory contains examples of the use of zlib and other relevant
24e00368fSchristosprograms and documentation.
34e00368fSchristos
44e00368fSchristosenough.c
54e00368fSchristos    calculation and justification of ENOUGH parameter in inftrees.h
64e00368fSchristos    - calculates the maximum table space used in inflate tree
74e00368fSchristos      construction over all possible Huffman codes
84e00368fSchristos
94e00368fSchristosfitblk.c
104e00368fSchristos    compress just enough input to nearly fill a requested output size
114e00368fSchristos    - zlib isn't designed to do this, but fitblk does it anyway
124e00368fSchristos
134e00368fSchristosgun.c
144e00368fSchristos    uncompress a gzip file
154e00368fSchristos    - illustrates the use of inflateBack() for high speed file-to-file
164e00368fSchristos      decompression using call-back functions
174e00368fSchristos    - is approximately twice as fast as gzip -d
184e00368fSchristos    - also provides Unix uncompress functionality, again twice as fast
194e00368fSchristos
204e00368fSchristosgzappend.c
214e00368fSchristos    append to a gzip file
224e00368fSchristos    - illustrates the use of the Z_BLOCK flush parameter for inflate()
234e00368fSchristos    - illustrates the use of deflatePrime() to start at any bit
244e00368fSchristos
254e00368fSchristosgzjoin.c
264e00368fSchristos    join gzip files without recalculating the crc or recompressing
274e00368fSchristos    - illustrates the use of the Z_BLOCK flush parameter for inflate()
284e00368fSchristos    - illustrates the use of crc32_combine()
294e00368fSchristos
304e00368fSchristosgzlog.c
314e00368fSchristosgzlog.h
324e00368fSchristos    efficiently and robustly maintain a message log file in gzip format
334e00368fSchristos    - illustrates use of raw deflate, Z_PARTIAL_FLUSH, deflatePrime(),
344e00368fSchristos      and deflateSetDictionary()
354e00368fSchristos    - illustrates use of a gzip header extra field
364e00368fSchristos
37*6881a400Schristosgznorm.c
38*6881a400Schristos    normalize a gzip file by combining members into a single member
39*6881a400Schristos    - demonstrates how to concatenate deflate streams using Z_BLOCK
40*6881a400Schristos
414e00368fSchristoszlib_how.html
424e00368fSchristos    painfully comprehensive description of zpipe.c (see below)
434e00368fSchristos    - describes in excruciating detail the use of deflate() and inflate()
444e00368fSchristos
454e00368fSchristoszpipe.c
464e00368fSchristos    reads and writes zlib streams from stdin to stdout
474e00368fSchristos    - illustrates the proper use of deflate() and inflate()
484e00368fSchristos    - deeply commented in zlib_how.html (see above)
494e00368fSchristos
504e00368fSchristoszran.c
51*6881a400Schristoszran.h
524e00368fSchristos    index a zlib or gzip stream and randomly access it
534e00368fSchristos    - illustrates the use of Z_BLOCK, inflatePrime(), and
544e00368fSchristos      inflateSetDictionary() to provide random access
55