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, web pages originally created by
Greg Roelofs
and maintained by Mark Adler.
If this page seems suspiciously similar to the
PNG Home Page, rest assured
that the similarity is completely coincidental. No, really.
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 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 can be reached via e-mail at
.
Please read the FAQ and
the manual before asking for help.
Nearly all of the questions we get already have an
answer in the zlib documentation. Questions on the usage of zlib are
best answered on Stack Overflow.
zlib development contributions and issues are best addressed on
zlib's GitHub repository.
The deflate and zlib specifications both achieved official Internet RFC status in May 1996,
and zlib itself was adopted 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 current release is publicly available here:
zlib source code, version 1.3.1, tar.gz format (1477K,
SHA-256 hash 9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23):
Please do not send questions or comments about zlib to
this mailing list. Send those directly to the authors at
after checking the FAQ and
the manual, of course. The zlib-devel list is for the development of
zlib—members are contributors to and testers of new versions of zlib.
Code to modify a message so that it generates the
desired CRC.spoof.c takes an abbreviated description of
the CRC, the exclusive-or of the current CRC of the message and the
desired CRC, the length of the message, and a list of bit locations in
a message, and tells you which of those bits should be inverted in the
message to get the desired CRC. Note that it does not need the message
itself, due to the linearity property of CRCs.
Code to merge multiple zip files into a single
zip file.zipknit.c accepts Zip64 input files, and will
create Zip64 output if the combined size of the merged zip file
warrants it. All compression formats are permitted, since no
decompression or recompression is performed. Encrypted entries are
permitted, and pass through unscathed.