Version 17 of zlib

Updated 2003-03-19 01:03:07

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 JARs.

loadable

Apparently the only documentation available at the zlib home is the "Compressed Data Format Specification version 3.3" [L1 ], also available as RFC 1950 [L2 ]. 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...


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."


[ Category Package | ]