|
kusano |
7d535a |
.TH ZLIB 3 "2 May 2012"
|
|
kusano |
7d535a |
.SH NAME
|
|
kusano |
7d535a |
zlib \- compression/decompression library
|
|
kusano |
7d535a |
.SH SYNOPSIS
|
|
kusano |
7d535a |
[see
|
|
kusano |
7d535a |
.I zlib.h
|
|
kusano |
7d535a |
for full description]
|
|
kusano |
7d535a |
.SH DESCRIPTION
|
|
kusano |
7d535a |
The
|
|
kusano |
7d535a |
.I zlib
|
|
kusano |
7d535a |
library is a general purpose data compression library.
|
|
kusano |
7d535a |
The code is thread safe, assuming that the standard library functions
|
|
kusano |
7d535a |
used are thread safe, such as memory allocation routines.
|
|
kusano |
7d535a |
It provides in-memory compression and decompression functions,
|
|
kusano |
7d535a |
including integrity checks of the uncompressed data.
|
|
kusano |
7d535a |
This version of the library supports only one compression method (deflation)
|
|
kusano |
7d535a |
but other algorithms may be added later
|
|
kusano |
7d535a |
with the same stream interface.
|
|
kusano |
7d535a |
.LP
|
|
kusano |
7d535a |
Compression can be done in a single step if the buffers are large enough
|
|
kusano |
7d535a |
or can be done by repeated calls of the compression function.
|
|
kusano |
7d535a |
In the latter case,
|
|
kusano |
7d535a |
the application must provide more input and/or consume the output
|
|
kusano |
7d535a |
(providing more output space) before each call.
|
|
kusano |
7d535a |
.LP
|
|
kusano |
7d535a |
The library also supports reading and writing files in
|
|
kusano |
7d535a |
.IR gzip (1)
|
|
kusano |
7d535a |
(.gz) format
|
|
kusano |
7d535a |
with an interface similar to that of stdio.
|
|
kusano |
7d535a |
.LP
|
|
kusano |
7d535a |
The library does not install any signal handler.
|
|
kusano |
7d535a |
The decoder checks the consistency of the compressed data,
|
|
kusano |
7d535a |
so the library should never crash even in the case of corrupted input.
|
|
kusano |
7d535a |
.LP
|
|
kusano |
7d535a |
All functions of the compression library are documented in the file
|
|
kusano |
7d535a |
.IR zlib.h .
|
|
kusano |
7d535a |
The distribution source includes examples of use of the library
|
|
kusano |
7d535a |
in the files
|
|
kusano |
7d535a |
.I test/example.c
|
|
kusano |
7d535a |
and
|
|
kusano |
7d535a |
.IR test/minigzip.c,
|
|
kusano |
7d535a |
as well as other examples in the
|
|
kusano |
7d535a |
.IR examples/
|
|
kusano |
7d535a |
directory.
|
|
kusano |
7d535a |
.LP
|
|
kusano |
7d535a |
Changes to this version are documented in the file
|
|
kusano |
7d535a |
.I ChangeLog
|
|
kusano |
7d535a |
that accompanies the source.
|
|
kusano |
7d535a |
.LP
|
|
kusano |
7d535a |
.I zlib
|
|
kusano |
7d535a |
is available in Java using the java.util.zip package:
|
|
kusano |
7d535a |
.IP
|
|
kusano |
7d535a |
http://java.sun.com/developer/technicalArticles/Programming/compression/
|
|
kusano |
7d535a |
.LP
|
|
kusano |
7d535a |
A Perl interface to
|
|
kusano |
7d535a |
.IR zlib ,
|
|
kusano |
7d535a |
written by Paul Marquess (pmqs@cpan.org),
|
|
kusano |
7d535a |
is available at CPAN (Comprehensive Perl Archive Network) sites,
|
|
kusano |
7d535a |
including:
|
|
kusano |
7d535a |
.IP
|
|
kusano |
7d535a |
http://search.cpan.org/~pmqs/IO-Compress-Zlib/
|
|
kusano |
7d535a |
.LP
|
|
kusano |
7d535a |
A Python interface to
|
|
kusano |
7d535a |
.IR zlib ,
|
|
kusano |
7d535a |
written by A.M. Kuchling (amk@magnet.com),
|
|
kusano |
7d535a |
is available in Python 1.5 and later versions:
|
|
kusano |
7d535a |
.IP
|
|
kusano |
7d535a |
http://docs.python.org/library/zlib.html
|
|
kusano |
7d535a |
.LP
|
|
kusano |
7d535a |
.I zlib
|
|
kusano |
7d535a |
is built into
|
|
kusano |
7d535a |
.IR tcl:
|
|
kusano |
7d535a |
.IP
|
|
kusano |
7d535a |
http://wiki.tcl.tk/4610
|
|
kusano |
7d535a |
.LP
|
|
kusano |
7d535a |
An experimental package to read and write files in .zip format,
|
|
kusano |
7d535a |
written on top of
|
|
kusano |
7d535a |
.I zlib
|
|
kusano |
7d535a |
by Gilles Vollant (info@winimage.com),
|
|
kusano |
7d535a |
is available at:
|
|
kusano |
7d535a |
.IP
|
|
kusano |
7d535a |
http://www.winimage.com/zLibDll/minizip.html
|
|
kusano |
7d535a |
and also in the
|
|
kusano |
7d535a |
.I contrib/minizip
|
|
kusano |
7d535a |
directory of the main
|
|
kusano |
7d535a |
.I zlib
|
|
kusano |
7d535a |
source distribution.
|
|
kusano |
7d535a |
.SH "SEE ALSO"
|
|
kusano |
7d535a |
The
|
|
kusano |
7d535a |
.I zlib
|
|
kusano |
7d535a |
web site can be found at:
|
|
kusano |
7d535a |
.IP
|
|
kusano |
7d535a |
http://zlib.net/
|
|
kusano |
7d535a |
.LP
|
|
kusano |
7d535a |
The data format used by the zlib library is described by RFC
|
|
kusano |
7d535a |
(Request for Comments) 1950 to 1952 in the files:
|
|
kusano |
7d535a |
.IP
|
|
kusano |
7d535a |
http://tools.ietf.org/html/rfc1950 (for the zlib header and trailer format)
|
|
kusano |
7d535a |
.br
|
|
kusano |
7d535a |
http://tools.ietf.org/html/rfc1951 (for the deflate compressed data format)
|
|
kusano |
7d535a |
.br
|
|
kusano |
7d535a |
http://tools.ietf.org/html/rfc1952 (for the gzip header and trailer format)
|
|
kusano |
7d535a |
.LP
|
|
kusano |
7d535a |
Mark Nelson wrote an article about
|
|
kusano |
7d535a |
.I zlib
|
|
kusano |
7d535a |
for the Jan. 1997 issue of Dr. Dobb's Journal;
|
|
kusano |
7d535a |
a copy of the article is available at:
|
|
kusano |
7d535a |
.IP
|
|
kusano |
7d535a |
http://marknelson.us/1997/01/01/zlib-engine/
|
|
kusano |
7d535a |
.SH "REPORTING PROBLEMS"
|
|
kusano |
7d535a |
Before reporting a problem,
|
|
kusano |
7d535a |
please check the
|
|
kusano |
7d535a |
.I zlib
|
|
kusano |
7d535a |
web site to verify that you have the latest version of
|
|
kusano |
7d535a |
.IR zlib ;
|
|
kusano |
7d535a |
otherwise,
|
|
kusano |
7d535a |
obtain the latest version and see if the problem still exists.
|
|
kusano |
7d535a |
Please read the
|
|
kusano |
7d535a |
.I zlib
|
|
kusano |
7d535a |
FAQ at:
|
|
kusano |
7d535a |
.IP
|
|
kusano |
7d535a |
http://zlib.net/zlib_faq.html
|
|
kusano |
7d535a |
.LP
|
|
kusano |
7d535a |
before asking for help.
|
|
kusano |
7d535a |
Send questions and/or comments to zlib@gzip.org,
|
|
kusano |
7d535a |
or (for the Windows DLL version) to Gilles Vollant (info@winimage.com).
|
|
kusano |
7d535a |
.SH AUTHORS
|
|
kusano |
7d535a |
Version 1.2.7
|
|
kusano |
7d535a |
Copyright (C) 1995-2012 Jean-loup Gailly (jloup@gzip.org)
|
|
kusano |
7d535a |
and Mark Adler (madler@alumni.caltech.edu).
|
|
kusano |
7d535a |
.LP
|
|
kusano |
7d535a |
This software is provided "as-is,"
|
|
kusano |
7d535a |
without any express or implied warranty.
|
|
kusano |
7d535a |
In no event will the authors be held liable for any damages
|
|
kusano |
7d535a |
arising from the use of this software.
|
|
kusano |
7d535a |
See the distribution directory with respect to requirements
|
|
kusano |
7d535a |
governing redistribution.
|
|
kusano |
7d535a |
The deflate format used by
|
|
kusano |
7d535a |
.I zlib
|
|
kusano |
7d535a |
was defined by Phil Katz.
|
|
kusano |
7d535a |
The deflate and
|
|
kusano |
7d535a |
.I zlib
|
|
kusano |
7d535a |
specifications were written by L. Peter Deutsch.
|
|
kusano |
7d535a |
Thanks to all the people who reported problems and suggested various
|
|
kusano |
7d535a |
improvements in
|
|
kusano |
7d535a |
.IR zlib ;
|
|
kusano |
7d535a |
who are too numerous to cite here.
|
|
kusano |
7d535a |
.LP
|
|
kusano |
7d535a |
UNIX manual page by R. P. C. Rodgers,
|
|
kusano |
7d535a |
U.S. National Library of Medicine (rodgers@nlm.nih.gov).
|
|
kusano |
7d535a |
.\" end of man page
|