xref: /minix3/common/dist/zlib/examples/README.examples (revision 44bedb31d842b4b0444105519bcf929a69fe2dc1)
1*44bedb31SLionel SambucThis directory contains examples of the use of zlib.
2*44bedb31SLionel Sambuc
3*44bedb31SLionel Sambucfitblk.c
4*44bedb31SLionel Sambuc    compress just enough input to nearly fill a requested output size
5*44bedb31SLionel Sambuc    - zlib isn't designed to do this, but fitblk does it anyway
6*44bedb31SLionel Sambuc
7*44bedb31SLionel Sambucgun.c
8*44bedb31SLionel Sambuc    uncompress a gzip file
9*44bedb31SLionel Sambuc    - illustrates the use of inflateBack() for high speed file-to-file
10*44bedb31SLionel Sambuc      decompression using call-back functions
11*44bedb31SLionel Sambuc    - is approximately twice as fast as gzip -d
12*44bedb31SLionel Sambuc    - also provides Unix uncompress functionality, again twice as fast
13*44bedb31SLionel Sambuc
14*44bedb31SLionel Sambucgzappend.c
15*44bedb31SLionel Sambuc    append to a gzip file
16*44bedb31SLionel Sambuc    - illustrates the use of the Z_BLOCK flush parameter for inflate()
17*44bedb31SLionel Sambuc    - illustrates the use of deflatePrime() to start at any bit
18*44bedb31SLionel Sambuc
19*44bedb31SLionel Sambucgzjoin.c
20*44bedb31SLionel Sambuc    join gzip files without recalculating the crc or recompressing
21*44bedb31SLionel Sambuc    - illustrates the use of the Z_BLOCK flush parameter for inflate()
22*44bedb31SLionel Sambuc    - illustrates the use of crc32_combine()
23*44bedb31SLionel Sambuc
24*44bedb31SLionel Sambucgzlog.c
25*44bedb31SLionel Sambucgzlog.h
26*44bedb31SLionel Sambuc    efficiently maintain a message log file in gzip format
27*44bedb31SLionel Sambuc    - illustrates use of raw deflate and Z_SYNC_FLUSH
28*44bedb31SLionel Sambuc    - illustrates use of gzip header extra field
29*44bedb31SLionel Sambuc
30*44bedb31SLionel Sambuczlib_how.html
31*44bedb31SLionel Sambuc    painfully comprehensive description of zpipe.c (see below)
32*44bedb31SLionel Sambuc    - describes in excruciating detail the use of deflate() and inflate()
33*44bedb31SLionel Sambuc
34*44bedb31SLionel Sambuczpipe.c
35*44bedb31SLionel Sambuc    reads and writes zlib streams from stdin to stdout
36*44bedb31SLionel Sambuc    - illustrates the proper use of deflate() and inflate()
37*44bedb31SLionel Sambuc    - deeply commented in zlib_how.html (see above)
38*44bedb31SLionel Sambuc
39*44bedb31SLionel Sambuczran.c
40*44bedb31SLionel Sambuc    index a zlib or gzip stream and randomly access it
41*44bedb31SLionel Sambuc    - illustrates the use of Z_BLOCK, inflatePrime(), and
42*44bedb31SLionel Sambuc      inflateSetDictionary() to provide random access
43