zlib is a software library used for data compression. zlib was written by Jean-Loup Gailly and Mark Adler and is an abstraction of the DEFLATE compression algorithm used in their gzip file compression program. The first public version, 0.9, was released on 1 May 1995 and was originally intended for use with libpng image library. It is free software, distributed under the zlib license.
As of March 2007Coverity’s Department of Homeland Security-sponsored ongoing examination of selected open-source projects.. Zlib is also a crucial component of many software platforms including Linux, Mac OS X and the iPhone OS. It has been also used in gaming consoles like Playstation 3 and Wii.
, zlib is included in
zlib compressed data is typically written with a gzip wrapper or a zlib wrapper. The wrapper encapsulates the raw DEFLATE data by adding a header and trailer. This provides stream identification and error detection which are not provided by the raw DEFLATE data.
The gzip header is larger than the zlib header as it stores a file name and other file system information. This is the header format used in the ubiquitous gzip file format.
Currently zlib only supports one algorithm called DEFLATE which is a variation of LZ77 (Lempel–Ziv 1977)
This algorithm provides good compression on a wide variety of data with minimal use of system resources. This is also the algorithm used in the ZIP archive format.
Full article ▸