241 lines
6.2 KiB
HTML
241 lines
6.2 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of ZLIB</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>ZLIB</H1>
|
|
Section: C Library Functions (3)<BR>Updated: 15 Jan 2017<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
zlib - compression/decompression library
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
[see
|
|
<I>zlib.h</I>
|
|
|
|
for full description]
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
The
|
|
<I>zlib</I>
|
|
|
|
library is a general purpose data compression library.
|
|
The code is thread safe, assuming that the standard library functions
|
|
used are thread safe, such as memory allocation routines.
|
|
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)
|
|
but other algorithms may be added later
|
|
with the same stream interface.
|
|
<P>
|
|
|
|
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.
|
|
<P>
|
|
|
|
The library also supports reading and writing files in
|
|
<I><A HREF="/cgi-bin/man/man2html?1+gzip">gzip</A></I>(1)
|
|
|
|
(.gz) format
|
|
with an interface similar to that of stdio.
|
|
<P>
|
|
|
|
The library does not install any signal handler.
|
|
The decoder checks the consistency of the compressed data,
|
|
so the library should never crash even in the case of corrupted input.
|
|
<P>
|
|
|
|
All functions of the compression library are documented in the file
|
|
<I>zlib.h</I>.
|
|
|
|
The distribution source includes examples of use of the library
|
|
in the files
|
|
<I>test/example.c</I>
|
|
|
|
and
|
|
<I>test/minigzip.c,</I>
|
|
|
|
as well as other examples in the
|
|
<I>examples/</I>
|
|
|
|
directory.
|
|
<P>
|
|
|
|
Changes to this version are documented in the file
|
|
<I>ChangeLog</I>
|
|
|
|
that accompanies the source.
|
|
<P>
|
|
|
|
<I>zlib</I>
|
|
|
|
is built in to many languages and operating systems, including but not limited to
|
|
Java, Python, .NET, PHP, Perl, Ruby, Swift, and Go.
|
|
<P>
|
|
|
|
An experimental package to read and write files in the .zip format,
|
|
written on top of
|
|
<I>zlib</I>
|
|
|
|
by Gilles Vollant (<A HREF="mailto:info@winimage.com">info@winimage.com</A>),
|
|
is available at:
|
|
<DL COMPACT>
|
|
<DT id="1"><DD>
|
|
<A HREF="http://www.winimage.com/zLibDll/minizip.html">http://www.winimage.com/zLibDll/minizip.html</A>
|
|
and also in the
|
|
<I>contrib/minizip</I>
|
|
|
|
directory of the main
|
|
<I>zlib</I>
|
|
|
|
source distribution.
|
|
</DL>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
The
|
|
<I>zlib</I>
|
|
|
|
web site can be found at:
|
|
<DL COMPACT>
|
|
<DT id="2"><DD>
|
|
<A HREF="http://zlib.net/">http://zlib.net/</A>
|
|
</DL>
|
|
<P>
|
|
|
|
The data format used by the
|
|
<I>zlib</I>
|
|
|
|
library is described by RFC
|
|
(Request for Comments) 1950 to 1952 in the files:
|
|
<DL COMPACT>
|
|
<DT id="3"><DD>
|
|
<A HREF="http://tools.ietf.org/html/rfc1950">http://tools.ietf.org/html/rfc1950</A> (for the zlib header and trailer format)
|
|
<BR>
|
|
|
|
<A HREF="http://tools.ietf.org/html/rfc1951">http://tools.ietf.org/html/rfc1951</A> (for the deflate compressed data format)
|
|
<BR>
|
|
|
|
<A HREF="http://tools.ietf.org/html/rfc1952">http://tools.ietf.org/html/rfc1952</A> (for the gzip header and trailer format)
|
|
</DL>
|
|
<P>
|
|
|
|
Mark Nelson wrote an article about
|
|
<I>zlib</I>
|
|
|
|
for the Jan. 1997 issue of Dr. Dobb's Journal;
|
|
a copy of the article is available at:
|
|
<DL COMPACT>
|
|
<DT id="4"><DD>
|
|
<A HREF="http://marknelson.us/1997/01/01/zlib-engine/">http://marknelson.us/1997/01/01/zlib-engine/</A>
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>REPORTING PROBLEMS</H2>
|
|
|
|
Before reporting a problem,
|
|
please check the
|
|
<I>zlib</I>
|
|
|
|
web site to verify that you have the latest version of
|
|
<I>zlib</I>;
|
|
|
|
otherwise,
|
|
obtain the latest version and see if the problem still exists.
|
|
Please read the
|
|
<I>zlib</I>
|
|
|
|
FAQ at:
|
|
<DL COMPACT>
|
|
<DT id="5"><DD>
|
|
<A HREF="http://zlib.net/zlib_faq.html">http://zlib.net/zlib_faq.html</A>
|
|
</DL>
|
|
<P>
|
|
|
|
before asking for help.
|
|
Send questions and/or comments to <A HREF="mailto:zlib@gzip.org">zlib@gzip.org</A>,
|
|
or (for the Windows DLL version) to Gilles Vollant (<A HREF="mailto:info@winimage.com">info@winimage.com</A>).
|
|
<A NAME="lbAG"> </A>
|
|
<H2>AUTHORS AND LICENSE</H2>
|
|
|
|
Version 1.2.11
|
|
<P>
|
|
|
|
Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
|
|
<P>
|
|
|
|
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.
|
|
<P>
|
|
|
|
Permission is granted to anyone to use this software for any purpose,
|
|
including commercial applications, and to alter it and redistribute it
|
|
freely, subject to the following restrictions:
|
|
<P>
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="6">step].<DD>
|
|
The origin of this software must not be misrepresented; you must not
|
|
claim that you wrote the original software. If you use this software
|
|
in a product, an acknowledgment in the product documentation would be
|
|
appreciated but is not required.
|
|
<DT id="7">step].<DD>
|
|
Altered source versions must be plainly marked as such, and must not be
|
|
misrepresented as being the original software.
|
|
<DT id="8">step].<DD>
|
|
This notice may not be removed or altered from any source distribution.
|
|
</DL>
|
|
<P>
|
|
|
|
Jean-loup Gailly Mark Adler
|
|
<BR>
|
|
|
|
<A HREF="mailto:jloup@gzip.org">jloup@gzip.org</A> <A HREF="mailto:madler@alumni.caltech.edu">madler@alumni.caltech.edu</A>
|
|
<P>
|
|
|
|
The deflate format used by
|
|
<I>zlib</I>
|
|
|
|
was defined by Phil Katz.
|
|
The deflate and
|
|
<I>zlib</I>
|
|
|
|
specifications were written by L. Peter Deutsch.
|
|
Thanks to all the people who reported problems and suggested various
|
|
improvements in
|
|
<I>zlib</I>;
|
|
|
|
who are too numerous to cite here.
|
|
<P>
|
|
|
|
UNIX manual page by R. P. C. Rodgers,
|
|
U.S. National Library of Medicine (<A HREF="mailto:rodgers@nlm.nih.gov">rodgers@nlm.nih.gov</A>).
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="9"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="10"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="11"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="12"><A HREF="#lbAE">SEE ALSO</A><DD>
|
|
<DT id="13"><A HREF="#lbAF">REPORTING PROBLEMS</A><DD>
|
|
<DT id="14"><A HREF="#lbAG">AUTHORS AND LICENSE</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:01 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|