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. It provides in-memory compression and decompres‐
14 sion functions, including integrity checks of the uncompressed data.
15 This version of the library supports only one compression method
16 (deflation) but other algorithms will be added later and will have the
17 same stream interface.
18
19 Compression can be done in a single step if the buffers are large
20 enough (for example if an input file is mmap'ed), or can be done by
21 repeated calls of the compression function. In the latter case, the
22 application must provide more input and/or consume the output (provid‐
23 ing 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 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.
35
36 Changes to this version are documented in the file ChangeLog that
37 accompanies the source, and are concerned primarily with bug fixes and
38 portability enhancements.
39
40 A Java implementation of zlib is available in the Java Development Kit
41 1.1:
42
43 http://www.javasoft.com/products/JDK/1.1/docs/api/Package-
44 java.util.zip.html
45
46 A Perl interface to zlib, written by Paul Marquess (pmqs@cpan.org), is
47 available at CPAN (Comprehensive Perl Archive Network) sites, includ‐
48 ing:
49
50 http://www.cpan.org/modules/by-module/Compress/
51
52 A Python interface to zlib, written by A.M. Kuchling (amk@magnet.com),
53 is available in Python 1.5 and later versions:
54
55 http://www.python.org/doc/lib/module-zlib.html
56
57 A zlib binding for tcl(1), written by Andreas Kupries (a.kupries@west‐
58 end.com), is availlable at:
59
60 http://www.westend.com/~kupries/doc/trf/man/man.html
61
62 An experimental package to read and write files in .zip format, written
63 on top of zlib by Gilles Vollant (info@winimage.com), is available at:
64
65 http://www.winimage.com/zLibDll/unzip.html and also in the con‐
66 trib/minizip directory of the main zlib web site.
67
69 The zlib web site can be found at either of these locations:
70
71 http://www.zlib.org
72 http://www.gzip.org/zlib/
73
74 The data format used by the zlib library is described by RFC (Request
75 for Comments) 1950 to 1952 in the files:
76
77 http://www.ietf.org/rfc/rfc1950.txt (concerning zlib format)
78 http://www.ietf.org/rfc/rfc1951.txt (concerning deflate format)
79 http://www.ietf.org/rfc/rfc1952.txt (concerning gzip format)
80
81 These documents are also available in other formats from:
82
83 ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html
84
85 Mark Nelson (markn@ieee.org) wrote an article about zlib for the Jan.
86 1997 issue of Dr. Dobb's Journal; a copy of the article is available
87 at:
88
89 http://dogma.net/markn/articles/zlibtool/zlibtool.htm
90
92 Before reporting a problem, please check the zlib web site to verify
93 that you have the latest version of zlib; otherwise, obtain the latest
94 version and see if the problem still exists. Please read the zlib FAQ
95 at:
96
97 http://www.gzip.org/zlib/zlib_faq.html
98
99 before asking for help. Send questions and/or comments to
100 zlib@gzip.org, or (for the Windows DLL version) to Gilles Vollant
101 (info@winimage.com).
102
104 Version 1.2.3 Copyright (C) 1995-2005 Jean-loup Gailly (jloup@gzip.org)
105 and Mark Adler (madler@alumni.caltech.edu).
106
107 This software is provided "as-is," without any express or implied war‐
108 ranty. In no event will the authors be held liable for any damages
109 arising from the use of this software. See the distribution directory
110 with respect to requirements governing redistribution. The deflate
111 format used by zlib was defined by Phil Katz. The deflate and zlib
112 specifications were written by L. Peter Deutsch. Thanks to all the
113 people who reported problems and suggested various improvements in
114 zlib; who are too numerous to cite here.
115
116 UNIX manual page by R. P. C. Rodgers, U.S. National Library of Medicine
117 (rodgers@nlm.nih.gov).
118
119
120
121 18 July 2005 ZLIB(3)