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

Allow deflateSetDictionary() and inflateSetDictionary() at any time in raw mode

deflatePrime() can now insert bits in the middle of the stream

./configure now creates a configure.log file with all of the results

Added a ./configure --solo option to compile zlib with no dependency on any libraries

Fixed a problem with large file support macros

Fixed a bug in contrib/puff

Many portability improvements

Version 1.2.5 fixes bugs in gzseek() and gzeof() that were present in version 1.2.4 (March 2010). All users are encouraged to upgrade immediately.

Version 1.2.4 has many changes over 1.2.3, including these improvements:

Fixed bugs in adler32_combine(), compressBound(), and deflateBound()

Wholesale replacement of gz* functions with faster versions

As part of that, added gzbuffer(), gzoffset(), gzclose_r(), and gzclose_w() functions

Faster Z_HUFFMAN_ONLY and Z_RLE compression for images and other specialized compression

Added flush options Z_BLOCK to deflate() and Z_TREES to inflate() for finer control

Added inflateReset2() and inflateMark() functions, the latter to aid in random access applications

Added LFS (Large File Summit) support for 64-bit file offsets and many other portability improvements

Updated examples in examples/ and updated third-party contributions in contrib/

If you are using libxml version 2.7.6 or earlier, you will need to update libxml to version 2.7.7 or later before installing zlib version 1.2.4 or later. libxml 2.7.6 and earlier made unnecessary assumptions about the undocumented internal structure of zlib that were changed in zlib 1.2.4 and result in libxml crashing. This was fixed in libxml 2.7.7.

Version 1.2.3 (July 2005) eliminates potential security vulnerabilities
in zlib 1.2.1 and 1.2.2, so all users of those versions should upgrade immediately. The following important fixes
are provided in zlib 1.2.3 over 1.2.1 and 1.2.2:

Versions 1.1.4 (March 2002) and later eliminate an earlier potential security vulnerability, see details here. Any software that is linked
against or derived from an earlier version of zlib should be upgraded
immediately.

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
.
Please read the FAQ and
the manual before asking
us for help. We are getting too many questions which already have an
answer in the zlib documentation.

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 related links. Note
that 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).

zlib Information

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.