xref: /dflybsd-src/contrib/zlib-1.2/README (revision c6c68a82af3a48187337cc9b7e0c859413b34a27)
11e9a6b47SJoerg SonnenbergerZLIB DATA COMPRESSION LIBRARY
21e9a6b47SJoerg Sonnenberger
3*e041647aSSascha Wildnerzlib 1.2.11 is a general purpose data compression library.  All the code is
41e9a6b47SJoerg Sonnenbergerthread safe.  The data format used by the zlib library is described by RFCs
51e9a6b47SJoerg Sonnenberger(Request for Comments) 1950 to 1952 in the files
6712f98b7SJohn Marinohttp://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and
7712f98b7SJohn Marinorfc1952 (gzip format).
81e9a6b47SJoerg Sonnenberger
91e9a6b47SJoerg SonnenbergerAll functions of the compression library are documented in the file zlib.h
101e9a6b47SJoerg Sonnenberger(volunteer to write man pages welcome, contact zlib@gzip.org).  A usage example
11712f98b7SJohn Marinoof the library is given in the file test/example.c which also tests that
12712f98b7SJohn Marinothe library is working correctly.  Another example is given in the file
13712f98b7SJohn Marinotest/minigzip.c.  The compression library itself is composed of all source
14712f98b7SJohn Marinofiles in the root directory.
151e9a6b47SJoerg Sonnenberger
161e9a6b47SJoerg SonnenbergerTo compile all files and run the test program, follow the instructions given at
17fe927c51SPeter Avalosthe top of Makefile.in.  In short "./configure; make test", and if that goes
18712f98b7SJohn Marinowell, "make install" should work for most flavors of Unix.  For Windows, use
19712f98b7SJohn Marinoone of the special makefiles in win32/ or contrib/vstudio/ .  For VMS, use
20fe927c51SPeter Avalosmake_vms.com.
211e9a6b47SJoerg Sonnenberger
221e9a6b47SJoerg SonnenbergerQuestions about zlib should be sent to <zlib@gzip.org>, or to Gilles Vollant
231e9a6b47SJoerg Sonnenberger<info@winimage.com> for the Windows DLL version.  The zlib home page is
24fe927c51SPeter Avaloshttp://zlib.net/ .  Before reporting a problem, please check this site to
25fe927c51SPeter Avalosverify that you have the latest version of zlib; otherwise get the latest
26fe927c51SPeter Avalosversion and check whether the problem still exists or not.
271e9a6b47SJoerg Sonnenberger
28fe927c51SPeter AvalosPLEASE read the zlib FAQ http://zlib.net/zlib_faq.html before asking for help.
291e9a6b47SJoerg Sonnenberger
301e9a6b47SJoerg SonnenbergerMark Nelson <markn@ieee.org> wrote an article about zlib for the Jan.  1997
31fe927c51SPeter Avalosissue of Dr.  Dobb's Journal; a copy of the article is available at
32fe927c51SPeter Avaloshttp://marknelson.us/1997/01/01/zlib-engine/ .
331e9a6b47SJoerg Sonnenberger
34*e041647aSSascha WildnerThe changes made in version 1.2.11 are documented in the file ChangeLog.
351e9a6b47SJoerg Sonnenberger
36fe927c51SPeter AvalosUnsupported third party contributions are provided in directory contrib/ .
371e9a6b47SJoerg Sonnenberger
38fe927c51SPeter Avaloszlib is available in Java using the java.util.zip package, documented at
39fe927c51SPeter Avaloshttp://java.sun.com/developer/technicalArticles/Programming/compression/ .
401e9a6b47SJoerg Sonnenberger
41fe927c51SPeter AvalosA Perl interface to zlib written by Paul Marquess <pmqs@cpan.org> is available
42fe927c51SPeter Avalosat CPAN (Comprehensive Perl Archive Network) sites, including
43fe927c51SPeter Avaloshttp://search.cpan.org/~pmqs/IO-Compress-Zlib/ .
441e9a6b47SJoerg Sonnenberger
451e9a6b47SJoerg SonnenbergerA Python interface to zlib written by A.M. Kuchling <amk@amk.ca> is
461e9a6b47SJoerg Sonnenbergeravailable in Python 1.5 and later versions, see
47712f98b7SJohn Marinohttp://docs.python.org/library/zlib.html .
481e9a6b47SJoerg Sonnenberger
49fe927c51SPeter Avaloszlib is built into tcl: http://wiki.tcl.tk/4610 .
501e9a6b47SJoerg Sonnenberger
511e9a6b47SJoerg SonnenbergerAn experimental package to read and write files in .zip format, written on top
521e9a6b47SJoerg Sonnenbergerof zlib by Gilles Vollant <info@winimage.com>, is available in the
531e9a6b47SJoerg Sonnenbergercontrib/minizip directory of zlib.
541e9a6b47SJoerg Sonnenberger
551e9a6b47SJoerg Sonnenberger
561e9a6b47SJoerg SonnenbergerNotes for some targets:
571e9a6b47SJoerg Sonnenberger
581e9a6b47SJoerg Sonnenberger- For Windows DLL versions, please see win32/DLL_FAQ.txt
591e9a6b47SJoerg Sonnenberger
601e9a6b47SJoerg Sonnenberger- For 64-bit Irix, deflate.c must be compiled without any optimization. With
611e9a6b47SJoerg Sonnenberger  -O, one libpng test fails. The test works in 32 bit mode (with the -n32
621e9a6b47SJoerg Sonnenberger  compiler flag). The compiler bug has been reported to SGI.
631e9a6b47SJoerg Sonnenberger
641e9a6b47SJoerg Sonnenberger- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works
651e9a6b47SJoerg Sonnenberger  when compiled with cc.
661e9a6b47SJoerg Sonnenberger
671e9a6b47SJoerg Sonnenberger- On Digital Unix 4.0D (formely OSF/1) on AlphaServer, the cc option -std1 is
681e9a6b47SJoerg Sonnenberger  necessary to get gzprintf working correctly. This is done by configure.
691e9a6b47SJoerg Sonnenberger
701e9a6b47SJoerg Sonnenberger- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with
711e9a6b47SJoerg Sonnenberger  other compilers. Use "make test" to check your compiler.
721e9a6b47SJoerg Sonnenberger
73fe927c51SPeter Avalos- gzdopen is not supported on RISCOS or BEOS.
741e9a6b47SJoerg Sonnenberger
751e9a6b47SJoerg Sonnenberger- For PalmOs, see http://palmzlib.sourceforge.net/
761e9a6b47SJoerg Sonnenberger
771e9a6b47SJoerg Sonnenberger
781e9a6b47SJoerg SonnenbergerAcknowledgments:
791e9a6b47SJoerg Sonnenberger
80fe927c51SPeter Avalos  The deflate format used by zlib was defined by Phil Katz.  The deflate and
81fe927c51SPeter Avalos  zlib specifications were written by L.  Peter Deutsch.  Thanks to all the
82fe927c51SPeter Avalos  people who reported problems and suggested various improvements in zlib; they
83fe927c51SPeter Avalos  are too numerous to cite here.
841e9a6b47SJoerg Sonnenberger
851e9a6b47SJoerg SonnenbergerCopyright notice:
861e9a6b47SJoerg Sonnenberger
87*e041647aSSascha Wildner (C) 1995-2017 Jean-loup Gailly and Mark Adler
881e9a6b47SJoerg Sonnenberger
891e9a6b47SJoerg Sonnenberger  This software is provided 'as-is', without any express or implied
901e9a6b47SJoerg Sonnenberger  warranty.  In no event will the authors be held liable for any damages
911e9a6b47SJoerg Sonnenberger  arising from the use of this software.
921e9a6b47SJoerg Sonnenberger
931e9a6b47SJoerg Sonnenberger  Permission is granted to anyone to use this software for any purpose,
941e9a6b47SJoerg Sonnenberger  including commercial applications, and to alter it and redistribute it
951e9a6b47SJoerg Sonnenberger  freely, subject to the following restrictions:
961e9a6b47SJoerg Sonnenberger
971e9a6b47SJoerg Sonnenberger  1. The origin of this software must not be misrepresented; you must not
981e9a6b47SJoerg Sonnenberger     claim that you wrote the original software. If you use this software
991e9a6b47SJoerg Sonnenberger     in a product, an acknowledgment in the product documentation would be
1001e9a6b47SJoerg Sonnenberger     appreciated but is not required.
1011e9a6b47SJoerg Sonnenberger  2. Altered source versions must be plainly marked as such, and must not be
1021e9a6b47SJoerg Sonnenberger     misrepresented as being the original software.
1031e9a6b47SJoerg Sonnenberger  3. This notice may not be removed or altered from any source distribution.
1041e9a6b47SJoerg Sonnenberger
1051e9a6b47SJoerg Sonnenberger  Jean-loup Gailly        Mark Adler
1061e9a6b47SJoerg Sonnenberger  jloup@gzip.org          madler@alumni.caltech.edu
1071e9a6b47SJoerg Sonnenberger
108fe927c51SPeter AvalosIf you use the zlib library in a product, we would appreciate *not* receiving
109fe927c51SPeter Avaloslengthy legal documents to sign.  The sources are provided for free but without
110fe927c51SPeter Avaloswarranty of any kind.  The library has been entirely written by Jean-loup
111fe927c51SPeter AvalosGailly and Mark Adler; it does not include third-party code.
1121e9a6b47SJoerg Sonnenberger
113fe927c51SPeter AvalosIf you redistribute modified sources, we would appreciate that you include in
114fe927c51SPeter Avalosthe file ChangeLog history information documenting your changes.  Please read
115fe927c51SPeter Avalosthe FAQ for more information on the distribution of modified source versions.
116