Yet another zlib wrapper ======================== Rev 0.10: Initial release This package defines a "zlib" command, which has a number of options, they are described below in the form of a sample call: set checksum [zlib adler32 data ?startvalue?] # adler32 calculates a quick "Adler-32" checksum set checksum [zlib crc32 data ?startvalue?] # crc32 calculates the standard "CRC-32" checksum set cdata [zlib compress data ?level?] # zlib-compress data with optional compression level set ddata [zlib deflate data ?level?] # headerless compression with optional compression level set data [zlib decompress cdata ?bufsize?] # zlib-decompress data with optional buffer size set data [zlib inflate ddata ?level?] # headerless decompression with optional buffer size Compress/decompress and deflate/inflate must be used in the proper pairs. When the bufsize is not specified, decompression starts with a 16 Kb buf, which gets resized by doubling until the output data fits in the buffer. Data is treated as binary, meaning that all input and output is going to be converted and treated as byte arrays in Tcl.