February 2006
Intermediate to advanced
648 pages
14h 53m
English
The zlib module supports data compression by providing access to the zlib library.
adler32(string [, value])
Computes the Adler-32 checksum of string. value is used as the starting value (which can be used to compute a checksum over the concatenation of several strings). Otherwise, a fixed default value is used.
compress(string [, level])
Compresses the data in string, where level is an integer from 1 to 9 controlling the level of compression. 1 is the least (fastest) compression, and 9 is the best (slowest) compression. The default value is 6. Returns a string containing the compressed data or raises error if an error occurs.
compressobj([level])
Returns a compression object. level has the same meaning as in the compress() function. ...