blob: d051c79b54072581c485a678de992cd46b37317b [file] [log] [blame]
Elliott Hughesee9e11d2012-01-31 11:31:13 -08001.TH ZLIB 3 "29 Jan 2012"
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -08002.SH NAME
3zlib \- compression/decompression library
4.SH SYNOPSIS
5[see
6.I zlib.h
7for full description]
8.SH DESCRIPTION
9The
10.I zlib
11library is a general purpose data compression library.
Elliott Hughes381716e2010-04-19 17:17:14 -070012The code is thread safe, assuming that the standard library functions
13used are thread safe, such as memory allocation routines.
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -080014It provides in-memory compression and decompression functions,
15including integrity checks of the uncompressed data.
16This version of the library supports only one compression method (deflation)
Elliott Hughes381716e2010-04-19 17:17:14 -070017but other algorithms may be added later
18with the same stream interface.
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -080019.LP
20Compression can be done in a single step if the buffers are large enough
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -080021or can be done by repeated calls of the compression function.
22In the latter case,
23the application must provide more input and/or consume the output
24(providing more output space) before each call.
25.LP
26The library also supports reading and writing files in
27.IR gzip (1)
28(.gz) format
29with an interface similar to that of stdio.
30.LP
31The library does not install any signal handler.
32The decoder checks the consistency of the compressed data,
Elliott Hughes381716e2010-04-19 17:17:14 -070033so the library should never crash even in the case of corrupted input.
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -080034.LP
35All functions of the compression library are documented in the file
36.IR zlib.h .
37The distribution source includes examples of use of the library
38in the files
Elliott Hughesee9e11d2012-01-31 11:31:13 -080039.I test/example.c
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -080040and
Elliott Hughesee9e11d2012-01-31 11:31:13 -080041.IR test/minigzip.c,
Elliott Hughes381716e2010-04-19 17:17:14 -070042as well as other examples in the
43.IR examples/
44directory.
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -080045.LP
46Changes to this version are documented in the file
47.I ChangeLog
Elliott Hughes381716e2010-04-19 17:17:14 -070048that accompanies the source.
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -080049.LP
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -080050.I zlib
Elliott Hughes381716e2010-04-19 17:17:14 -070051is available in Java using the java.util.zip package:
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -080052.IP
Elliott Hughes381716e2010-04-19 17:17:14 -070053http://java.sun.com/developer/technicalArticles/Programming/compression/
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -080054.LP
55A Perl interface to
56.IR zlib ,
57written by Paul Marquess (pmqs@cpan.org),
58is available at CPAN (Comprehensive Perl Archive Network) sites,
59including:
60.IP
Elliott Hughes381716e2010-04-19 17:17:14 -070061http://search.cpan.org/~pmqs/IO-Compress-Zlib/
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -080062.LP
63A Python interface to
64.IR zlib ,
65written by A.M. Kuchling (amk@magnet.com),
66is available in Python 1.5 and later versions:
67.IP
Elliott Hughesee9e11d2012-01-31 11:31:13 -080068http://docs.python.org/library/zlib.html
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -080069.LP
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -080070.I zlib
Elliott Hughes381716e2010-04-19 17:17:14 -070071is built into
72.IR tcl:
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -080073.IP
Elliott Hughes381716e2010-04-19 17:17:14 -070074http://wiki.tcl.tk/4610
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -080075.LP
76An experimental package to read and write files in .zip format,
77written on top of
78.I zlib
79by Gilles Vollant (info@winimage.com),
80is available at:
81.IP
Elliott Hughes381716e2010-04-19 17:17:14 -070082http://www.winimage.com/zLibDll/minizip.html
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -080083and also in the
84.I contrib/minizip
85directory of the main
86.I zlib
Elliott Hughes381716e2010-04-19 17:17:14 -070087source distribution.
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -080088.SH "SEE ALSO"
89The
90.I zlib
Elliott Hughes381716e2010-04-19 17:17:14 -070091web site can be found at:
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -080092.IP
Elliott Hughes381716e2010-04-19 17:17:14 -070093http://zlib.net/
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -080094.LP
95The data format used by the zlib library is described by RFC
96(Request for Comments) 1950 to 1952 in the files:
97.IP
Elliott Hughesee9e11d2012-01-31 11:31:13 -080098http://tools.ietf.org/html/rfc1950 (for the zlib header and trailer format)
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -080099.br
Elliott Hughesee9e11d2012-01-31 11:31:13 -0800100http://tools.ietf.org/html/rfc1951 (for the deflate compressed data format)
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -0800101.br
Elliott Hughesee9e11d2012-01-31 11:31:13 -0800102http://tools.ietf.org/html/rfc1952 (for the gzip header and trailer format)
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -0800103.LP
Elliott Hughes381716e2010-04-19 17:17:14 -0700104Mark Nelson wrote an article about
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -0800105.I zlib
106for the Jan. 1997 issue of Dr. Dobb's Journal;
107a copy of the article is available at:
108.IP
Elliott Hughes381716e2010-04-19 17:17:14 -0700109http://marknelson.us/1997/01/01/zlib-engine/
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -0800110.SH "REPORTING PROBLEMS"
111Before reporting a problem,
112please check the
113.I zlib
114web site to verify that you have the latest version of
115.IR zlib ;
116otherwise,
117obtain the latest version and see if the problem still exists.
118Please read the
119.I zlib
120FAQ at:
121.IP
Elliott Hughes381716e2010-04-19 17:17:14 -0700122http://zlib.net/zlib_faq.html
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -0800123.LP
124before asking for help.
125Send questions and/or comments to zlib@gzip.org,
126or (for the Windows DLL version) to Gilles Vollant (info@winimage.com).
127.SH AUTHORS
Elliott Hughesee9e11d2012-01-31 11:31:13 -0800128Version 1.2.6
129Copyright (C) 1995-2012 Jean-loup Gailly (jloup@gzip.org)
The Android Open Source Project9e38dfa2009-03-03 19:31:38 -0800130and Mark Adler (madler@alumni.caltech.edu).
131.LP
132This software is provided "as-is,"
133without any express or implied warranty.
134In no event will the authors be held liable for any damages
135arising from the use of this software.
136See the distribution directory with respect to requirements
137governing redistribution.
138The deflate format used by
139.I zlib
140was defined by Phil Katz.
141The deflate and
142.I zlib
143specifications were written by L. Peter Deutsch.
144Thanks to all the people who reported problems and suggested various
145improvements in
146.IR zlib ;
147who are too numerous to cite here.
148.LP
149UNIX manual page by R. P. C. Rodgers,
150U.S. National Library of Medicine (rodgers@nlm.nih.gov).
151.\" end of man page