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