zlib

A Massively Spiffy Yet Delicately Unobtrusive Compression Library
(Also Free, Not to Mention Unencumbered by Patents)

(Not Related to the Linux zlibc Compressing File-I/O Library)


Welcome to the zlib Home Page, maintained by Greg Roelofs (on disk space provided by Walnut Creek CD-ROM). If this page seems suspiciously similar to the PNG Home Page, rest assured that the similarity is completely coincidental. No, really.


[DDJ's zlib image] zlib is designed to be a free, general-purpose, legally unencumbered -- that is, not covered by any patents -- lossless data-compression library for use on virtually any computer hardware and operating system. The zlib data format is itself portable across platforms. Unlike the LZW compression method used in Unix compress(1), the compression method currently used in zlib essentially never expands the data. (LZW can double or triple the file size in extreme cases.) zlib's memory footprint is also independent of the input data and can be reduced, if necessary, at some cost in compression. A more precise, technical discussion of both points is available on another page.

zlib was written by Jean-loup Gailly (compression) and Mark Adler (decompression). Jean-loup is also the primary author/maintainer of gzip(1), the author of the comp.compression FAQ list and the former maintainer of Info-ZIP's Zip; Mark is also the author of gzip's and UnZip's main decompression routines and was the original author of Zip. Not surprisingly, the compression algorithm used in zlib is essentially the same as that in gzip and Zip, namely, the `deflate' method that originated in PKWARE's PKZIP 2.x.

Mark and Jean-loup can be reached by e-mail at zlib@quest.jpl.nasa.gov .

Greg, Mark and/or Jean-loup will add some more stuff here when they think of something to add. For now this page is mainly a pointer to zlib itself and to the official zlib and deflate documentation. Note that the specifications both achieved official Internet RFC status in May 1996, and zlib itself was adopted by JavaSoft in version 1.1 of the Java Development Kit (JDK), both as a raw class and as a component of the JAR archive format.

The lovely zlib-vise image above was provided courtesy of Bruce Gardner, art director of Dr. Dobb's Journal. It appears in Mark Nelson's article in the January 1997 issue (see below).


The source code for the current release version is publicly available for general use:

 * zlib source code, version 1.1.2, gzip'd tar format (121k):

 * US (California) (also via ftp)
 * US (Virginia)
 * France

 * zlib source code, version 1.1.2, zipfile format (186k):

 * US (California) (also via ftp)
 * US (Virginia)
 * France

Version 1.1.2 adds a number of new features, including contributed code; see the ChangeLog for details.

Note that zlib is an integral part of libpng and has been tested extensively as part of many PNG-supporting applications. Upcoming versions of gzip and UnZip will also use zlib.


Related Links

 * zlib Documentation
 * zlib Technical Details

 * Mark Nelson's ZlibTool article and source code for Dr. Dobb's Journal (January 1997)
 * zlib for Windows 95/NT (DLL version, plus related utilities)
 * zlib for OS/2 (static version, plus related utilities and libraries)
 * zlib 32-bit OCX (C++ source and binaries for use with Visual Basic 4.x or Delphi 2.0)
(unsupported VB5 binary also available)
 * zlib Perl interface (source code; look for Compress-Zlib*.tar.gz)
 * zlib Python interface (online manual; part of the standard library as of Python 1.5)
 * zlib Tcl interface (online manual; see chapter on ``Where to Get'')
 * zlib Java interface (see also JAR format)
 * Mark Nelson's JavaZip article (with source code) for Dr. Dobb's Journal (December 1997)
 * Gilles Vollant's zlib-based mini-zip and mini-unzip
(see also Info-ZIP's UnZip, which can optionally be compiled with zlib)

 * Real World Scanning and Halftones (second edition includes a section on zlib)

 * Markus Oberhumer's LZO `real-time' data compression library
(not tested by us, but looks like a good alternative if you need more speed and less compression)
 * PPP Deflate Protocol (RFC 1979)
 * Info-ZIP Home Page
 * Portable Network Graphics (PNG) Home Page
 * gzip Home Page
 * Compression Pointers
 * comp.compression Frequently Asked Questions list


Last modified 28 April 1998 by newt@pobox.com , you betcha.
Send comments or questions about zlib itself to the authors at zlib@quest.jpl.nasa.gov .

Copyright © 1996-1998 Greg Roelofs.