Project: ArangoDB (App Definition and Development / Database)
File: zlib.3.pdf

ZLIB(3) ZLIB(3)
NAME
zlib − compression/decompression libr ar y
SYNOPSIS
[see zlib.h forfull description]
DESCRIPTION
Thezliblibrar yis a general purpose data compression libr ar y.The code is thread saf e, assuming
that the standard libr ar yfunctions used are thread saf e, such as memor yallocation routines .It
provides in-memor ycompression and decompression functions ,including integ rity checks of the
uncompressed data. This version of the libr ar ysuppor ts only one compression method (deﬂa-
tion) but other algorithms ma yb ea dded later with the same stream interface.
Compression can be done in a single step if the b uffers are large enough or can be done b y
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.
The libr ar yalso supports reading and writing ﬁles in gzip(1) (.gz) f or mat with an interface similar
to that of stdio.
The libr ar ydoes not install an ysignal handler .The decoder checks the consistency of the com-
pressed data, so the libr ar yshould ne vercrash eveni nt he case of corrupted input.
All functions of the compression libr ar yare documented in the ﬁle zlib.h .The distr ibution source
includes examples of use of the libr ar yin the ﬁles test/example.c andtest/minigzip.c, as well as
other examples in the examples/ director y .
Changes to this version are documented in the ﬁle ChangeLog that accompanies the source.
zlibis built in to man ylanguages and operating systems ,including but not limited to J ava, Python,
.NET ,PHP,Per l,Ruby, Swift, and Go.
An exper imental package to read and write ﬁles in the .zip f or mat, wr itten on top of zlibby G illes
Vollant (info@winimage.com), is a vailable at:
http://www.winimage.com/zLibDll/minizip .html and also in the contr ib/minizip director y of
the main zlibsource distribution.
SEE ALSO
Thezlibwebsite can be found at:
http://zlib.net/
The data f or mat used b ythezliblibrar yis described b yRFC (Request for Comments) 1950 to
1952 in the ﬁles:
http://tools.ietf.org/html/rfc1950 (for the zlib header and trailer f or mat)
http://tools.ietf.org/html/rfc1951 (for the deﬂate compressed data f or mat)
http://tools.ietf.org/html/rfc1952 (for the gzip header and trailer f or mat)
Mar k Nelson wrote an article about zlibforthe Jan. 1997 issue of Dr.Dobb’sJour nal; acopyof
the article is a vailable at:
http://mar knelson.us/1997/01/01/zlib-engine/
REPORTING PROBLEMS
Before reporting a problem, please chec kthezlibwebsite to v er ify that you ha ve the latest v er-
sion of zlib;otherwise ,obtain the latest version and see if the problem still e xists.Please read
thezlibFA Q at:
http://zlib.net/zlib_faq.html
before asking for help .Send questions and/or comments to zlib@gzip .org, or (for the Windo ws
DLL version) to Gilles Vollant (info@winimage.com).
13 Oct 2022 1ZLIB(3) ZLIB(3)
AUTHORS AND LICENSE
Version 1.2.13
Copyr ight (C) 1995-2022 Jean-loup Gailly and Mar kAdler
This software is provided ’as-is’, without an yexpress or implied w arranty .Inn oe vent will the
authors be held liable for an ydamages arising from the use of this software.
Permission is g ranted to an yone to use this software for an ypur pose ,including commercial appli-
cations ,and to alter it and redistribute it freely ,subject to the following restrictions:
1. The or igin of this software must not be misrepresented; you must not claim that you wrote the
or iginal software .I fyou use this software in a product, an ac knowledgment in the product doc-
umentation would be appreciated but is not required.
2. Altered source versions must be plainly mar keda ss uch, and must not be misrepresented as
being the original software.
3. This notice ma ynot be remo vedo ra ltered from an ysource distribution.
Jean-loup Gailly Mar k Adler
jloup@gzip .org madler@alumni.caltech.edu
The deﬂate f or mat used b yzlibwasdeﬁned b yPhil Katz. The deﬂate and zlibspeciﬁcations
were written b yL .P eter Deutsch. Thanks to all the people who reported problems and suggested
various impro vements in zlib;who are too numerous to cite here.
UNIX manual page b yR .P .C .R odgers ,U .S.N ational Libr ar y of Medicine
(rodgers@nlm.nih.gov).
13 Oct 2022 2