3 deflateinit, deflate, deflatezlib, deflateblock, deflatezlibblock, inflateinit, inflate, inflatezlib, inflateblock, inflatezlibblock, flateerr, mkcrctab, blockcrc, adler32 \- deflate compression
17 int deflate(void *wr, int (*w)(void*,void*,int),
20 void *rr, int (*r)(void*,void*,int),
26 int deflatezlib(void *wr, int (*w)(void*,void*,int),
29 void *rr, int (*r)(void*,void*,int),
35 int deflateblock(uchar *dst, int dsize,
38 uchar *src, int ssize,
44 int deflatezlibblock(uchar *dst, int dsize,
47 uchar *src, int ssize,
56 int inflate(void *wr, int (*w)(void*, void*, int),
59 void *getr, int (*get)(void*))
62 int inflatezlib(void *wr, int (*w)(void*, void*, int),
65 void *getr, int (*get)(void*))
68 int inflateblock(uchar *dst, int dsize,
71 uchar *src, int ssize)
74 int inflatezlibblock(uchar *dst, int dsize,
77 uchar *src, int ssize)
80 char *flateerr(int error)
83 ulong *mkcrctab(ulong poly)
86 ulong blockcrc(ulong *tab, ulong crc, void *buf, int n)
89 ulong adler32(ulong adler, void *buf, int n)
91 These routines compress and decompress data using the deflate compression algorithm,
92 which is used for most gzip, zip, and zlib files.
95 compresses input data retrieved by calls to
99 an input buffer, and a count of bytes to read.
101 should return the number of bytes read;
102 end of input is signaled by returning zero, an input error by
103 returning a negative number.
104 The compressed output is written to
108 the output data, and the number of bytes to write.
110 should return the number of bytes written;
111 writing fewer than the requested number of bytes is an error.
113 indicates the amount of computation deflate should do while compressing the data.
116 usually take more time and produce smaller outputs.
117 Valid values are 1 to 9, inclusive; 6 is a good compromise.
120 is non-zero, cryptic debugging information is produced on standard error.
123 reverses the process, converting compressed data into uncompressed output.
124 Input is retrieved one byte at a time by calling
128 End of input of signaled by returning a negative value.
129 The uncompressed output is written to
131 which has the same interface as for
138 operate on blocks of memory but are otherwise similar to
143 The zlib functions are similar, but operate on files with a zlib header and trailer.
148 must be called once before any call to the corresponding routines.
150 If the above routines fail,
151 they return a negative number indicating the problem.
152 The possible values are
155 .IR FlateOutputFail ,
160 converts the number into a printable message.
162 is defined to be zero,
163 the successful return value for
171 The block functions return the number of bytes produced when they succeed.
177 initializes, and returns a table for rapid computation of 32 bit CRC values using the polynomial
190 and returns the new value.
192 should initially be zero.
194 pre-conditions and post-conditions
196 by ones complementation.
199 updates the Adler 32-bit checksum of the
205 (that is, its value after seeing zero bytes) should be 1.