1ZLIB(3) Library Functions Manual ZLIB(3)
2
3
4
6 zlib - compression/decompression library
7
9 [see zlib.h for full description]
10
12 The zlib library is a general purpose data compression library. The
13 code is thread safe, assuming that the standard library functions used
14 are thread safe, such as memory allocation routines. It provides in-
15 memory compression and decompression functions, including integrity
16 checks of the uncompressed data. This version of the library supports
17 only one compression method (deflation) but other algorithms may be
18 added later with the same stream interface.
19
20 Compression can be done in a single step if the buffers are large
21 enough or can be done by repeated calls of the compression function.
22 In the latter case, the application must provide more input and/or con‐
23 sume the output (providing more output space) before each call.
24
25 The library also supports reading and writing files in gzip(1) (.gz)
26 format with an interface similar to that of stdio.
27
28 The library does not install any signal handler. The decoder checks
29 the consistency of the compressed data, so the library should never
30 crash even in the case of corrupted input.
31
32 All functions of the compression library are documented in the file
33 zlib.h. The distribution source includes examples of use of the
34 library in the files example.c and minigzip.c, as well as other exam‐
35 ples in the examples/ directory.
36
37 Changes to this version are documented in the file ChangeLog that
38 accompanies the source.
39
40 zlib is available in Java using the java.util.zip package:
41
42 http://java.sun.com/developer/technicalArticles/Programming/com‐
43 pression/
44
45 A Perl interface to zlib, written by Paul Marquess (pmqs@cpan.org), is
46 available at CPAN (Comprehensive Perl Archive Network) sites, includ‐
47 ing:
48
49 http://search.cpan.org/~pmqs/IO-Compress-Zlib/
50
51 A Python interface to zlib, written by A.M. Kuchling (amk@magnet.com),
52 is available in Python 1.5 and later versions:
53
54 http://www.python.org/doc/lib/module-zlib.html
55
56 zlib is built into tcl:
57
58 http://wiki.tcl.tk/4610
59
60 An experimental package to read and write files in .zip format, written
61 on top of zlib by Gilles Vollant (info@winimage.com), is available at:
62
63 http://www.winimage.com/zLibDll/minizip.html and also in the
64 contrib/minizip directory of the main zlib source distribution.
65
67 The zlib web site can be found at:
68
69 http://zlib.net/
70
71 The data format used by the zlib library is described by RFC (Request
72 for Comments) 1950 to 1952 in the files:
73
74 http://www.ietf.org/rfc/rfc1950.txt (for the zlib header and
75 trailer format)
76 http://www.ietf.org/rfc/rfc1951.txt (for the deflate compressed
77 data format)
78 http://www.ietf.org/rfc/rfc1952.txt (for the gzip header and
79 trailer format)
80
81 Mark Nelson wrote an article about zlib for the Jan. 1997 issue of Dr.
82 Dobb's Journal; a copy of the article is available at:
83
84 http://marknelson.us/1997/01/01/zlib-engine/
85
87 Before reporting a problem, please check the zlib web site to verify
88 that you have the latest version of zlib; otherwise, obtain the latest
89 version and see if the problem still exists. Please read the zlib FAQ
90 at:
91
92 http://zlib.net/zlib_faq.html
93
94 before asking for help. Send questions and/or comments to
95 zlib@gzip.org, or (for the Windows DLL version) to Gilles Vollant
96 (info@winimage.com).
97
99 Version 1.2.5 Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org)
100 and Mark Adler (madler@alumni.caltech.edu).
101
102 This software is provided "as-is," without any express or implied war‐
103 ranty. In no event will the authors be held liable for any damages
104 arising from the use of this software. See the distribution directory
105 with respect to requirements governing redistribution. The deflate
106 format used by zlib was defined by Phil Katz. The deflate and zlib
107 specifications were written by L. Peter Deutsch. Thanks to all the
108 people who reported problems and suggested various improvements in
109 zlib; who are too numerous to cite here.
110
111 UNIX manual page by R. P. C. Rodgers, U.S. National Library of Medicine
112 (rodgers@nlm.nih.gov).
113
114
115
116 19 Apr 2010 ZLIB(3)