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
freesoftware.com).
If this page seems suspiciously similar to the
PNG Home Page, rest assured
that the similarity is completely coincidental. No, really.
Current release:
zlib 1.1.3
-
Canonical URL: http://www.info-zip.org/pub/infozip/zlib/
(California, USA)
-
Mirror sites (see CTAN mirror
list for more):
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)
and in the GIF image format, 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@gzip.org .
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 is publicly available at several
locations:
-
zlib source code, version 1.1.3, gzip'd tar format (168k,
MD5 checksum ada18615d2a66dee4d6f5ff916ecd4c6):
-
US (California)
(also via
ftp)
-
US (Virginia)
-
France
-
zlib source code, version 1.1.3, zipfile format (219k,
MD5 checksum 4c1e855abff7112debf7b387998e0d5c):
-
US (California)
(also via
ftp)
-
US (Virginia)
-
France
Version 1.1.3 fixes a number of buglets in the gz* functions and one ``inflate
input-buffer bug that shows up on rare but persistent occasions''; it also
adds a number of new contrib items, including 586 and 686 assembler routines.
See the ChangeLog for details.
NOTE: there is a bug in the zlib encoder for window
sizes of 256 bytes (windowBits == 8). A 512-byte window is the smallest the
encoder can safely use. (Most applications use the default
32,768-byte window size for best compression. See this link for more 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 Frequently Asked Questions
-
zlib Manual
-
zlib Technical Details
-
zlib-Related Specifications
-
zlib's Deflate Algorithm
-
zlib License
-
unofficial (contributed) patches and binaries
(not tested by zlib team)
-
includes patches and ports for Cygwin, Delphi 5, Palm OS,
Win64, and WinCE; performance patches (match.asm for MASM 6.1,
malloc optimization); and binaries for Win16, Win32, and WinCE
-
zlib for Linux, both shared and
static plus headers (mostly version 1.1.3, RPM format, many
architectures)
-
zlib for
HP-UX 10.20 and 11.00 (version 1.1.3, shared library and headers)
-
(alternatively here: HP-UX 10.20 and HP-UX 11.00)
-
zlib
for SGI Irix 6.x (version 1.1.3, shared library and headers)
-
(alternatively Irix 6.2 and Irix 6.5 binaries)
-
zlib for Solaris, both SPARC (2.5.1, 2.6, 2.7/7.0) and x86 (2.7/7.0) (version 1.1.3)
-
zlib for Digital Unix 4.0 (version 1.1.3)
-
zlib for SCO Open Server 5.0 (version 1.1.3)
-
zlib for BeOS R5
(version 1.1.3)
-
zlib for Mac OS X
(version 1.1.3)
-
(Note that zlib 1.1.3 is included as part of the Mac OS X
Public Beta under /System/Library/Frameworks/Zip.framework;
#include <Zip/zlib.h> to compile. The ``official''
zlib for Darwin 1.2 is here as of 21 November 2000; check here if the link breaks.)
-
zlib for Mac OS
(version 1.1.3)
-
zlib for
OS/2 (version 1.1.3, DLL and static version for emx 0.9c, 46k)
-
(click here if link breaks)
-
zlib for Palm Pilot
(port of version 1.1.3, possibly based on old 1.0.4 port)
-
zlib for Windows CE
(port of version 1.1.3, 205k)
-
zlib for
Windows 9x/NT (version 1.1.3, DLL version, plus related utilities)
-
zlib for
Windows 9x/NT (version 1.1.3, DLL and static version, 88k)
-
Mark Nelson's
ZlibTool article and
Win32 source code for
Dr. Dobb's Journal (January 1997)
-
zlib 32-bit OCX and 16-bit DLL
(Visual Basic interface, source code and binaries, 84k)
-
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 Pascal port (version 1.1.2, Pascal source, tested with Turbo
Pascal 7.0 and Delphi 3.02)
-
(not tested by us, but looks complete and well-maintained)
-
zlib Delphi 5 interface (update of contrib/delphi2 files)
-
(includes compiled object files and corresponding C++ Builder 5
project files)
-
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 the Download link)
-
zlib Java interface (see also JAR format)
-
zlib reimplementation in pure
Java
-
(not tested by us, but looks like a good alternative to
java.util.zip)
-
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 optionally can be compiled with zlib)
-
Scott Ludwig's zlib-based
CExe executable compressor for Win32
-
Gilbert Baumann's inflate implementation in
Common Lisp
-
(file src/net/deflate.lisp in Closure source archive)
-
zlib technical issues, including spec errors and outstanding bugs
-
zlib information in Japanese
-
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)
-
libbzip2
-
(not tested by us, but looks like a good alternative if you need
more compression and less speed)
-
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
Send comments or questions about zlib to the authors at
zlib@gzip.org .
Please report broken links to newt@pobox.com .
Last updated 21 April 2001, you betcha.