Zlib is a data compression library found at http://www.gzip.org/zlib/ . Its specification "achieved official Internet RFC status in 1996", and is part of standard [Java], used, moreover, by [JAR]s. Apparently the only documentation available at the zlib home is the "Compressed Data Format Specification version 3.3" [ftp://swrinde.nde.swri.edu/pub/png/documents/zlib/rfc-zlib.html#conventions], also available as RFC 1950 [http://www.ietf.org/rfc/rfc1950.txt]. The programming interface for the basic Tcl binding is simply zlib option data ?...? http://www.equi4.com/critlib/zlib.README provides a bit more detail, including these specifics: 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 ---- Since zlib is being used in at least [Tclkit], there must be a Tcl binding of it. Is this (or some other) binding available as stand alone code for someone who was looking to use it? Could someone point to some documentation regarding the binding? At the very least, someone could download the sources to Tclkit (follow the link below and subsequent links to find that) and paw through the pieces... ---- '''18Aug2004 [PS]''': I created an extension which provides the [[zlib]] command from tclkit for non-tclkit. You can download the source at [http://pascal.scheffers.net/software/zlib-1.1.1.tar.bz2]. For Msys+Mingw builds on win32, I suggest you download [http://pascal.scheffers.net/software/zlib-1.1.1-with-libz.tar.bz2] instead, which has zlib bundled. I also have a windows binary for your pleasure: [http://pascal.scheffers.net/software/zlib-1.1.1.win32.zip] -- enjoy! ---- Examples ---- Included in [Tclkit] (yes in 8.4.1, but not in 8.4a3). Regarding [ActiveTcl], this distribution comes with two different bindings. A low-level one is provided by [Img] (1.3rc), basically just loading zlib and providing a stub table for it. A high-level binding is provided by [Trf]. This uses the low-level binding when available, and loads zlib directly if not. "Grab the zlib source from http://www.equi4.com/pub/tk/tars, look at what genkit does with it." "Another source of the same zlib as in tclkit is http://www.equi4.com/critlib - so you can use critcl to build a zlib which is equivalent to tclkit's." ---- mkZiplib is a wrapper for Zlib 1.1.3 and Minizip 0.15. With mkZiplib you can compress/decompress data on-the-fly and work with .gz and .zip files from within Tcl. http://mkextensions.sourceforge.net/mkzipman.htm ---- [[ [Category Package] | ]]