xref: /netbsd/common/dist/zlib/README (revision 6164d288)
1aaf4ece6SchristosZLIB DATA COMPRESSION LIBRARY
2aaf4ece6Schristos
3*6164d288Schristoszlib 1.2.13 is a general purpose data compression library.  All the code is
4aaf4ece6Schristosthread safe.  The data format used by the zlib library is described by RFCs
5aaf4ece6Schristos(Request for Comments) 1950 to 1952 in the files
6de1ce4f6Schristoshttp://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and
7de1ce4f6Schristosrfc1952 (gzip format).
8aaf4ece6Schristos
9aaf4ece6SchristosAll functions of the compression library are documented in the file zlib.h
10aaf4ece6Schristos(volunteer to write man pages welcome, contact zlib@gzip.org).  A usage example
11de1ce4f6Schristosof the library is given in the file test/example.c which also tests that
12de1ce4f6Schristosthe library is working correctly.  Another example is given in the file
13de1ce4f6Schristostest/minigzip.c.  The compression library itself is composed of all source
14de1ce4f6Schristosfiles in the root directory.
15aaf4ece6Schristos
16aaf4ece6SchristosTo compile all files and run the test program, follow the instructions given at
17de1ce4f6Schristosthe top of Makefile.in.  In short "./configure; make test", and if that goes
18de1ce4f6Schristoswell, "make install" should work for most flavors of Unix.  For Windows, use
19de1ce4f6Schristosone of the special makefiles in win32/ or contrib/vstudio/ .  For VMS, use
20de1ce4f6Schristosmake_vms.com.
21aaf4ece6Schristos
22aaf4ece6SchristosQuestions about zlib should be sent to <zlib@gzip.org>, or to Gilles Vollant
23aaf4ece6Schristos<info@winimage.com> for the Windows DLL version.  The zlib home page is
24de1ce4f6Schristoshttp://zlib.net/ .  Before reporting a problem, please check this site to
25de1ce4f6Schristosverify that you have the latest version of zlib; otherwise get the latest
26de1ce4f6Schristosversion and check whether the problem still exists or not.
27aaf4ece6Schristos
28de1ce4f6SchristosPLEASE read the zlib FAQ http://zlib.net/zlib_faq.html before asking for help.
29aaf4ece6Schristos
30aaf4ece6SchristosMark Nelson <markn@ieee.org> wrote an article about zlib for the Jan.  1997
31de1ce4f6Schristosissue of Dr.  Dobb's Journal; a copy of the article is available at
32de1ce4f6Schristoshttp://marknelson.us/1997/01/01/zlib-engine/ .
33aaf4ece6Schristos
34*6164d288SchristosThe changes made in version 1.2.13 are documented in the file ChangeLog.
35aaf4ece6Schristos
36de1ce4f6SchristosUnsupported third party contributions are provided in directory contrib/ .
37aaf4ece6Schristos
38de1ce4f6Schristoszlib is available in Java using the java.util.zip package, documented at
39de1ce4f6Schristoshttp://java.sun.com/developer/technicalArticles/Programming/compression/ .
40aaf4ece6Schristos
41de1ce4f6SchristosA Perl interface to zlib written by Paul Marquess <pmqs@cpan.org> is available
42de1ce4f6Schristosat CPAN (Comprehensive Perl Archive Network) sites, including
43de1ce4f6Schristoshttp://search.cpan.org/~pmqs/IO-Compress-Zlib/ .
44aaf4ece6Schristos
45aaf4ece6SchristosA Python interface to zlib written by A.M. Kuchling <amk@amk.ca> is
46aaf4ece6Schristosavailable in Python 1.5 and later versions, see
47de1ce4f6Schristoshttp://docs.python.org/library/zlib.html .
48aaf4ece6Schristos
49de1ce4f6Schristoszlib is built into tcl: http://wiki.tcl.tk/4610 .
50aaf4ece6Schristos
51aaf4ece6SchristosAn experimental package to read and write files in .zip format, written on top
52aaf4ece6Schristosof zlib by Gilles Vollant <info@winimage.com>, is available in the
53aaf4ece6Schristoscontrib/minizip directory of zlib.
54aaf4ece6Schristos
55aaf4ece6Schristos
56aaf4ece6SchristosNotes for some targets:
57aaf4ece6Schristos
58aaf4ece6Schristos- For Windows DLL versions, please see win32/DLL_FAQ.txt
59aaf4ece6Schristos
60aaf4ece6Schristos- For 64-bit Irix, deflate.c must be compiled without any optimization. With
61aaf4ece6Schristos  -O, one libpng test fails. The test works in 32 bit mode (with the -n32
62aaf4ece6Schristos  compiler flag). The compiler bug has been reported to SGI.
63aaf4ece6Schristos
64aaf4ece6Schristos- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works
65aaf4ece6Schristos  when compiled with cc.
66aaf4ece6Schristos
67aaf4ece6Schristos- On Digital Unix 4.0D (formely OSF/1) on AlphaServer, the cc option -std1 is
68aaf4ece6Schristos  necessary to get gzprintf working correctly. This is done by configure.
69aaf4ece6Schristos
70aaf4ece6Schristos- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with
71aaf4ece6Schristos  other compilers. Use "make test" to check your compiler.
72aaf4ece6Schristos
73de1ce4f6Schristos- gzdopen is not supported on RISCOS or BEOS.
74aaf4ece6Schristos
75aaf4ece6Schristos- For PalmOs, see http://palmzlib.sourceforge.net/
76aaf4ece6Schristos
77aaf4ece6Schristos
78aaf4ece6SchristosAcknowledgments:
79aaf4ece6Schristos
80de1ce4f6Schristos  The deflate format used by zlib was defined by Phil Katz.  The deflate and
81de1ce4f6Schristos  zlib specifications were written by L.  Peter Deutsch.  Thanks to all the
82de1ce4f6Schristos  people who reported problems and suggested various improvements in zlib; they
83de1ce4f6Schristos  are too numerous to cite here.
84aaf4ece6Schristos
85aaf4ece6SchristosCopyright notice:
86aaf4ece6Schristos
87*6164d288Schristos (C) 1995-2022 Jean-loup Gailly and Mark Adler
88aaf4ece6Schristos
89aaf4ece6Schristos  This software is provided 'as-is', without any express or implied
90aaf4ece6Schristos  warranty.  In no event will the authors be held liable for any damages
91aaf4ece6Schristos  arising from the use of this software.
92aaf4ece6Schristos
93aaf4ece6Schristos  Permission is granted to anyone to use this software for any purpose,
94aaf4ece6Schristos  including commercial applications, and to alter it and redistribute it
95aaf4ece6Schristos  freely, subject to the following restrictions:
96aaf4ece6Schristos
97aaf4ece6Schristos  1. The origin of this software must not be misrepresented; you must not
98aaf4ece6Schristos     claim that you wrote the original software. If you use this software
99aaf4ece6Schristos     in a product, an acknowledgment in the product documentation would be
100aaf4ece6Schristos     appreciated but is not required.
101aaf4ece6Schristos  2. Altered source versions must be plainly marked as such, and must not be
102aaf4ece6Schristos     misrepresented as being the original software.
103aaf4ece6Schristos  3. This notice may not be removed or altered from any source distribution.
104aaf4ece6Schristos
105aaf4ece6Schristos  Jean-loup Gailly        Mark Adler
106aaf4ece6Schristos  jloup@gzip.org          madler@alumni.caltech.edu
107aaf4ece6Schristos
108de1ce4f6SchristosIf you use the zlib library in a product, we would appreciate *not* receiving
109de1ce4f6Schristoslengthy legal documents to sign.  The sources are provided for free but without
110de1ce4f6Schristoswarranty of any kind.  The library has been entirely written by Jean-loup
111*6164d288SchristosGailly and Mark Adler; it does not include third-party code.  We make all
112*6164d288Schristoscontributions to and distributions of this project solely in our personal
113*6164d288Schristoscapacity, and are not conveying any rights to any intellectual property of
114*6164d288Schristosany third parties.
115aaf4ece6Schristos
116de1ce4f6SchristosIf you redistribute modified sources, we would appreciate that you include in
117de1ce4f6Schristosthe file ChangeLog history information documenting your changes.  Please read
118de1ce4f6Schristosthe FAQ for more information on the distribution of modified source versions.
119