xref: /netbsd-src/common/dist/zlib/README (revision b175d1c2a0d8a7ee59df83b5ae5f0bd11632ced6)
1aaf4ece6SchristosZLIB DATA COMPRESSION LIBRARY
2aaf4ece6Schristos
3*b175d1c2Schristoszlib 1.3.1 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
6c3423655Schristoshttp://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and
7c3423655Schristosrfc1952 (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
11c3423655Schristosof the library is given in the file test/example.c which also tests that
12c3423655Schristosthe library is working correctly.  Another example is given in the file
13c3423655Schristostest/minigzip.c.  The compression library itself is composed of all source
14c3423655Schristosfiles in the root directory.
15aaf4ece6Schristos
16aaf4ece6SchristosTo compile all files and run the test program, follow the instructions given at
17c3423655Schristosthe top of Makefile.in.  In short "./configure; make test", and if that goes
18c3423655Schristoswell, "make install" should work for most flavors of Unix.  For Windows, use
19c3423655Schristosone of the special makefiles in win32/ or contrib/vstudio/ .  For VMS, use
20c3423655Schristosmake_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
24c3423655Schristoshttp://zlib.net/ .  Before reporting a problem, please check this site to
25c3423655Schristosverify that you have the latest version of zlib; otherwise get the latest
26c3423655Schristosversion and check whether the problem still exists or not.
27aaf4ece6Schristos
28c3423655SchristosPLEASE 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
31c3423655Schristosissue of Dr.  Dobb's Journal; a copy of the article is available at
32*b175d1c2Schristoshttps://marknelson.us/posts/1997/01/01/zlib-engine.html .
33aaf4ece6Schristos
34*b175d1c2SchristosThe changes made in version 1.3.1 are documented in the file ChangeLog.
35aaf4ece6Schristos
36c3423655SchristosUnsupported third party contributions are provided in directory contrib/ .
37aaf4ece6Schristos
38*b175d1c2Schristoszlib is available in Java using the java.util.zip package. Follow the API
39*b175d1c2SchristosDocumentation link at: https://docs.oracle.com/search/?q=java.util.zip .
40aaf4ece6Schristos
41*b175d1c2SchristosA Perl interface to zlib and bzip2 written by Paul Marquess <pmqs@cpan.org>
42*b175d1c2Schristoscan be found at https://github.com/pmqs/IO-Compress .
43aaf4ece6Schristos
44aaf4ece6SchristosA Python interface to zlib written by A.M. Kuchling <amk@amk.ca> is
45aaf4ece6Schristosavailable in Python 1.5 and later versions, see
46c3423655Schristoshttp://docs.python.org/library/zlib.html .
47aaf4ece6Schristos
48c3423655Schristoszlib is built into tcl: http://wiki.tcl.tk/4610 .
49aaf4ece6Schristos
50aaf4ece6SchristosAn experimental package to read and write files in .zip format, written on top
51aaf4ece6Schristosof zlib by Gilles Vollant <info@winimage.com>, is available in the
52aaf4ece6Schristoscontrib/minizip directory of zlib.
53aaf4ece6Schristos
54aaf4ece6Schristos
55aaf4ece6SchristosNotes for some targets:
56aaf4ece6Schristos
57aaf4ece6Schristos- For Windows DLL versions, please see win32/DLL_FAQ.txt
58aaf4ece6Schristos
59aaf4ece6Schristos- For 64-bit Irix, deflate.c must be compiled without any optimization. With
60aaf4ece6Schristos  -O, one libpng test fails. The test works in 32 bit mode (with the -n32
61aaf4ece6Schristos  compiler flag). The compiler bug has been reported to SGI.
62aaf4ece6Schristos
63aaf4ece6Schristos- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works
64aaf4ece6Schristos  when compiled with cc.
65aaf4ece6Schristos
66*b175d1c2Schristos- On Digital Unix 4.0D (formerly OSF/1) on AlphaServer, the cc option -std1 is
67aaf4ece6Schristos  necessary to get gzprintf working correctly. This is done by configure.
68aaf4ece6Schristos
69aaf4ece6Schristos- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with
70aaf4ece6Schristos  other compilers. Use "make test" to check your compiler.
71aaf4ece6Schristos
72c3423655Schristos- gzdopen is not supported on RISCOS or BEOS.
73aaf4ece6Schristos
74aaf4ece6Schristos- For PalmOs, see http://palmzlib.sourceforge.net/
75aaf4ece6Schristos
76aaf4ece6Schristos
77aaf4ece6SchristosAcknowledgments:
78aaf4ece6Schristos
79c3423655Schristos  The deflate format used by zlib was defined by Phil Katz.  The deflate and
80c3423655Schristos  zlib specifications were written by L.  Peter Deutsch.  Thanks to all the
81c3423655Schristos  people who reported problems and suggested various improvements in zlib; they
82c3423655Schristos  are too numerous to cite here.
83aaf4ece6Schristos
84aaf4ece6SchristosCopyright notice:
85aaf4ece6Schristos
86*b175d1c2Schristos (C) 1995-2024 Jean-loup Gailly and Mark Adler
87aaf4ece6Schristos
88aaf4ece6Schristos  This software is provided 'as-is', without any express or implied
89aaf4ece6Schristos  warranty.  In no event will the authors be held liable for any damages
90aaf4ece6Schristos  arising from the use of this software.
91aaf4ece6Schristos
92aaf4ece6Schristos  Permission is granted to anyone to use this software for any purpose,
93aaf4ece6Schristos  including commercial applications, and to alter it and redistribute it
94aaf4ece6Schristos  freely, subject to the following restrictions:
95aaf4ece6Schristos
96aaf4ece6Schristos  1. The origin of this software must not be misrepresented; you must not
97aaf4ece6Schristos     claim that you wrote the original software. If you use this software
98aaf4ece6Schristos     in a product, an acknowledgment in the product documentation would be
99aaf4ece6Schristos     appreciated but is not required.
100aaf4ece6Schristos  2. Altered source versions must be plainly marked as such, and must not be
101aaf4ece6Schristos     misrepresented as being the original software.
102aaf4ece6Schristos  3. This notice may not be removed or altered from any source distribution.
103aaf4ece6Schristos
104aaf4ece6Schristos  Jean-loup Gailly        Mark Adler
105aaf4ece6Schristos  jloup@gzip.org          madler@alumni.caltech.edu
106aaf4ece6Schristos
107c3423655SchristosIf you use the zlib library in a product, we would appreciate *not* receiving
108c3423655Schristoslengthy legal documents to sign.  The sources are provided for free but without
109c3423655Schristoswarranty of any kind.  The library has been entirely written by Jean-loup
110ec47cc4bSchristosGailly and Mark Adler; it does not include third-party code.  We make all
111ec47cc4bSchristoscontributions to and distributions of this project solely in our personal
112ec47cc4bSchristoscapacity, and are not conveying any rights to any intellectual property of
113ec47cc4bSchristosany third parties.
114aaf4ece6Schristos
115c3423655SchristosIf you redistribute modified sources, we would appreciate that you include in
116c3423655Schristosthe file ChangeLog history information documenting your changes.  Please read
117c3423655Schristosthe FAQ for more information on the distribution of modified source versions.
118