Compress/decompress data using the zlib library.
Errors throw a ZlibException.
Compute the Adler32 checksum of the data in buf[]. adler is the starting value when computing a cumulative checksum.
Compute the CRC32 checksum of the data in buf[]. crc is the starting value when computing a cumulative checksum.
Compresses the data in srcbuf[] using compression level level. The default value for level is 6, legal values are 1..9, with 1 being the least compression and 9 being the most. Returns the compressed data.
Decompresses the data in srcbuf[].
void[] srcbuf | buffer containing the compressed data. |
size_t destlen | size of the uncompressed data. It need not be accurate, but the decompression will be faster if the exact size is supplied. |
int winbits | the base two logarithm of the maximum window size. |
the header format the compressed stream is wrapped in
a standard zlib header
a gzip file format header
used when decompressing. Try to automatically detect the stream format by looking at the data
Used when the data to be compressed is not all in one buffer.
Construct. level is the same as for D.zlib.compress(). header can be used to make a gzip compatible stream.
Compress the data in buf and return the compressed data. The buffers returned from successive calls to this should be concatenated together.
Compress and return any remaining data. The returned data should be appended to that returned by compress().
int mode | one of the following:
|
Used when the data to be decompressed is not all in one buffer.
Construct. destbufsize is the same as for D.zlib.uncompress().
Decompress the data in buf and return the decompressed data. The buffers returned from successive calls to this should be concatenated together.
Decompress and return any remaining data. The returned data should be appended to that returned by uncompress(). The UnCompress object cannot be used further.