Skip to content

Commit

Permalink
zlib 1.2.4-pre1
Browse files Browse the repository at this point in the history
  • Loading branch information
madler committed Sep 10, 2011
1 parent 7751bd4 commit 67cc20d
Show file tree
Hide file tree
Showing 67 changed files with 2,822 additions and 3,019 deletions.
21 changes: 12 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,19 @@ if(MSVC)
endif()

if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
# If we're doing an out of source build and the user has a zconf.h
# in their source tree...
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h)
message(FATAL_ERROR "You must remove zconf.h from the source tree. This f
ile is generated by the ./configure script shipped with zlib. CMake generates t
his file for you automatically in the build directory")
# If we're doing an out of source build and the user has a zconf.h
# in their source tree...
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h)
message(FATAL_ERROR
"You must remove ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h "
"from the source tree. This file is included with zlib "
"but CMake generates this file for you automatically "
"in the build directory.")
endif()
endif()

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.in
${CMAKE_CURRENT_SOURCE_DIR}/zconf.h @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein
${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY)
include_directories(${CMAKE_CURRENT_BINARY_DIR})


Expand All @@ -85,7 +87,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
#============================================================================

set(ZLIB_PUBLIC_HDRS
zconf.h
${CMAKE_CURRENT_BINARY_DIR}/zconf.h
zlib.h
)
set(ZLIB_PRIVATE_HDRS
Expand Down Expand Up @@ -129,6 +131,7 @@ if(MINGW)
COMMAND windres.exe
-D GCC_WINDRES
-I ${CMAKE_CURRENT_SOURCE_DIR}
-I ${CMAKE_CURRENT_BINARY_DIR}
-o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
-i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc)
set(ZLIB_SRCS ${ZLIB_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
Expand Down
27 changes: 26 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@

ChangeLog file for zlib

Changes in 1.2.4 (11 Mar 2010)
- Fix VER3 extraction in configure for no fourth subversion
- Update zlib.3, add docs to Makefile.in to make .pdf out of it
- Add zlib.3.pdf to distribution
- Don't set error code in gzerror() if passed pointer is NULL
- Apply destination directory fixes to CMakeLists.txt [Lowman]
- Move #cmakedefine's to a new zconf.in.cmakein
- Restore zconf.h for builds that don't use configure or cmake
- Add distclean to dummy Makefile for convenience
- Update and improve INDEX, README, and FAQ
- Update CMakeLists.txt for the return of zconf.h [Lowman]
- Update contrib/vstudio/vc9 and vc10 [Vollant]
- Change libz.dll.a back to libzdll.a in win32/Makefile.gcc
- Apply license and readme changes to contrib/asm686 [Raiter]
- Check file name lengths and add -c option in minigzip.c [Li]
- Update contrib/amd64 and contrib/masmx86/ [Vollant]
- Avoid use of "eof" parameter in trees.c to not shadow library variable
- Update make_vms.com for removal of zlibdefs.h [Zinser]
- Update assembler code and vstudio projects in contrib [Vollant]
- Remove outdated assembler code contrib/masm686 and contrib/asm586
- Remove old vc7 and vc8 from contrib/vstudio
- Update win32/Makefile.msc, add ZLIB_VER_SUBREVISION [Rowe]
- Fix memory leaks in gzclose_r() and gzclose_w(), file leak in gz_open()
- Add contrib/gcc_gvmat64 for longest_match and inflate_fast [Vollant]

Changes in 1.2.3.9 (21 Feb 2010)
- Expunge gzio.c
- Move as400 build information to old
Expand Down Expand Up @@ -256,7 +281,7 @@ Changes in 1.2.2.4 (11 July 2005)
compile
- Fix some spelling errors in comments [Betts]
- Correct inflateInit2() error return documentation in zlib.h
- Added zran.c example of compressed data random access to examples
- Add zran.c example of compressed data random access to examples
directory, shows use of inflatePrime()
- Fix cast for assignments to strm->state in inflate.c and infback.c
- Fix zlibCompileFlags() in zutil.c to use 1L for long shifts [Oberhumer]
Expand Down
259 changes: 132 additions & 127 deletions FAQ

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions INDEX
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@ CMakeLists.txt cmake build file
ChangeLog history of changes
FAQ Frequently Asked Questions about zlib
INDEX this file
Makefile dummy Makefile that tells you to ./configure
Makefile.in template for Unix Makefile
README guess what
configure configure script for Unix
make_vms.com makefile for VMS
treebuild.xml XML description of source file dependencies
zconf.h.cmakein zconf.h template for cmake
zconf.h.in zconf.h template for configure
zlib.3 Man page for zlib
zlib.3.pdf Man page in PDF format
zlib.map Linux symbol information
zlib.pc.in Template for pkg-config descriptor
zlib2ansi perl script to convert source files for C++ compilation

amiga/ makefiles for Amiga SAS C
as400/ makefiles for IBM AS/400
doc/ documentation for formats and algorithms
msdos/ makefiles for MSDOS
nintendods/ makefile for Nintendo DS
objs/ destination for object files
old/ makefiles for various architectures and zlib documentation
files that have not yet been updated for zlib 1.2.x
pics/ destination for position-independent-code object files
projects/ projects for various Integrated Development Environments
qnx/ makefiles for QNX
watcom/ makefiles for OpenWatcom
win32/ makefiles for Windows

zlib public header files (required for library use):
zconf.h (made by configure)
zconf.h
zlib.h

private source files used to build the zlib library:
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
all:
-@echo "Use ./configure first. Thank you."

distclean:
make -f Makefile.in distclean
19 changes: 16 additions & 3 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ CPP=$(CC) -E

STATICLIB=libz.a
SHAREDLIB=libz.so
SHAREDLIBV=libz.so.1.2.3.9
SHAREDLIBV=libz.so.1.2.4
SHAREDLIBM=libz.so.1
LIBS=$(STATICLIB) $(SHAREDLIB) $(SHAREDLIBV)

Expand Down Expand Up @@ -193,6 +193,18 @@ uninstall:
cd $(DESTDIR)$(man3dir); rm -f zlib.3
cd $(DESTDIR)$(pkgconfigdir); rm -f zlib.pc

docs: zlib.3.pdf

zlib.3.pdf: zlib.3
groff -mandoc -f H -T ps zlib.3 | ps2pdf - zlib.3.pdf

zconf.h.in: zconf.h.cmakein
sed "/^#cmakedefine/D" < zconf.h.cmakein > zconf.h.in
touch -r zconf.h.cmakein zconf.h.in

zconf: zconf.h.in
cp -p zconf.h.in zconf.h

mostlyclean: clean
clean:
rm -f *.o *.lo *~ \
Expand All @@ -203,10 +215,11 @@ clean:
rm -rf objs

maintainer-clean: distclean
distclean: clean
rm -f Makefile zconf.h zlib.pc
distclean: clean zconf docs
rm -f Makefile zlib.pc
-@rm -f .DS_Store
-@printf 'all:\n\t-@echo "Use ./configure first. Thank you."\n' > Makefile
-@printf '\ndistclean:\n\tmake -f Makefile.in distclean\n' >> Makefile
-@touch -r Makefile.in Makefile

tags:
Expand Down
85 changes: 37 additions & 48 deletions README
Original file line number Diff line number Diff line change
@@ -1,56 +1,51 @@
ZLIB DATA COMPRESSION LIBRARY

zlib 1.2.3.9 is a general purpose data compression library. All the code is
zlib 1.2.4 is a general purpose data compression library. All the code is
thread safe. The data format used by the zlib library is described by RFCs
(Request for Comments) 1950 to 1952 in the files
http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
and rfc1952.txt (gzip format). These documents are also available in other
formats from ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html
and rfc1952.txt (gzip format).

All functions of the compression library are documented in the file zlib.h
(volunteer to write man pages welcome, contact [email protected]). A usage example
(volunteer to write man pages welcome, contact [email protected]). A usage example
of the library is given in the file example.c which also tests that the library
is working correctly. Another example is given in the file minigzip.c. The
is working correctly. Another example is given in the file minigzip.c. The
compression library itself is composed of all source files except example.c and
minigzip.c.

To compile all files and run the test program, follow the instructions given at
the top of Makefile. In short "make test; make install" should work for most
machines. For Unix: "./configure; make test; make install". For MSDOS, use one
of the special makefiles such as Makefile.msc. For VMS, use make_vms.com.
the top of Makefile.in. In short "./configure; make test", and if that goes
well, "make install" should work for most flavors of Unix. For Windows, use one
of the special makefiles in win32/ or projects/ . For VMS, use make_vms.com.

Questions about zlib should be sent to <[email protected]>, or to Gilles Vollant
<[email protected]> for the Windows DLL version. The zlib home page is
http://www.zlib.org or http://www.gzip.org/zlib/ Before reporting a problem,
please check this site to verify that you have the latest version of zlib;
otherwise get the latest version and check whether the problem still exists or
not.
<[email protected]> for the Windows DLL version. The zlib home page is
http://zlib.net/ . Before reporting a problem, please check this site to
verify that you have the latest version of zlib; otherwise get the latest
version and check whether the problem still exists or not.

PLEASE read the zlib FAQ http://www.gzip.org/zlib/zlib_faq.html before asking
for help.
PLEASE read the zlib FAQ http://zlib.net/zlib_faq.html before asking for help.

Mark Nelson <[email protected]> wrote an article about zlib for the Jan. 1997
issue of Dr. Dobb's Journal; a copy of the article is available in
http://dogma.net/markn/articles/zlibtool/zlibtool.htm
Mark Nelson <[email protected]> wrote an article about zlib for the Jan. 1997
issue of Dr. Dobb's Journal; a copy of the article is available at
http://marknelson.us/1997/01/01/zlib-engine/ .

The changes made in version 1.2.3.9 are documented in the file ChangeLog.
The changes made in version 1.2.4 are documented in the file ChangeLog.

Unsupported third party contributions are provided in directory "contrib".
Unsupported third party contributions are provided in directory contrib/ .

A Java implementation of zlib is available in the Java Development Kit
http://java.sun.com/j2se/1.4.2/docs/api/java/util/zip/package-summary.html
See the zlib home page http://www.zlib.org for details.
zlib is available in Java using the java.util.zip package, documented at
http://java.sun.com/developer/technicalArticles/Programming/compression/ .

A Perl interface to zlib written by Paul Marquess <[email protected]> is in the
CPAN (Comprehensive Perl Archive Network) sites
http://www.cpan.org/modules/by-module/Compress/
A Perl interface to zlib written by Paul Marquess <[email protected]> is available
at CPAN (Comprehensive Perl Archive Network) sites, including
http://search.cpan.org/~pmqs/IO-Compress-Zlib/ .

A Python interface to zlib written by A.M. Kuchling <[email protected]> is
available in Python 1.5 and later versions, see
http://www.python.org/doc/lib/module-zlib.html
http://www.python.org/doc/lib/module-zlib.html .

A zlib binding for TCL written by Andreas Kupries <[email protected]> is
availlable at http://www.oche.de/~akupries/soft/trf/trf_zip.html
zlib is built into tcl: http://wiki.tcl.tk/4610 .

An experimental package to read and write files in .zip format, written on top
of zlib by Gilles Vollant <[email protected]>, is available in the
Expand All @@ -74,25 +69,21 @@ Notes for some targets:
- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with
other compilers. Use "make test" to check your compiler.

- gzdopen is not supported on RISCOS, BEOS and by some Mac compilers.
- gzdopen is not supported on RISCOS or BEOS.

- For PalmOs, see http://palmzlib.sourceforge.net/

- When building a shared, i.e. dynamic library on Mac OS X, the library must be
installed before testing (do "make install" before "make test"), since the
library location is specified in the library.


Acknowledgments:

The deflate format used by zlib was defined by Phil Katz. The deflate
and zlib specifications were written by L. Peter Deutsch. Thanks to all the
people who reported problems and suggested various improvements in zlib;
they are too numerous to cite here.
The deflate format used by zlib was defined by Phil Katz. The deflate and
zlib specifications were written by L. Peter Deutsch. Thanks to all the
people who reported problems and suggested various improvements in zlib; they
are too numerous to cite here.

Copyright notice:

(C) 1995-2004 Jean-loup Gailly and Mark Adler
(C) 1995-2010 Jean-loup Gailly and Mark Adler

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand All @@ -113,13 +104,11 @@ Copyright notice:
Jean-loup Gailly Mark Adler
[email protected] [email protected]

If you use the zlib library in a product, we would appreciate *not*
receiving lengthy legal documents to sign. The sources are provided
for free but without warranty of any kind. The library has been
entirely written by Jean-loup Gailly and Mark Adler; it does not
include third-party code.
If you use the zlib library in a product, we would appreciate *not* receiving
lengthy legal documents to sign. The sources are provided for free but without
warranty of any kind. The library has been entirely written by Jean-loup
Gailly and Mark Adler; it does not include third-party code.

If you redistribute modified sources, we would appreciate that you include
in the file ChangeLog history information documenting your changes. Please
read the FAQ for more information on the distribution of modified source
versions.
If you redistribute modified sources, we would appreciate that you include in
the file ChangeLog history information documenting your changes. Please read
the FAQ for more information on the distribution of modified source versions.
4 changes: 2 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
STATICLIB=libz.a
LDFLAGS="${LDFLAGS} -L. ${STATICLIB}"
VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`
VER3=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h`
VER3=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\\.[0-9]*\).*/\1/p' < zlib.h`
VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h`
VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h`
AR=${AR-"ar"}
Expand Down Expand Up @@ -250,7 +250,7 @@ EOF
fi
fi

sed "/^#cmakedefine/D" < zconf.h.in > zconf.h
cp -p zconf.h.in zconf.h

cat > $test.c <<EOF
#include <unistd.h>
Expand Down
19 changes: 10 additions & 9 deletions contrib/README.contrib
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ amd64/ by Mikhail Teterin <[email protected]>
asm code for AMD64
See patch at http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/96393

asm586/
asm686/ by Brian Raiter <[email protected]>
asm code for Pentium and PPro/PII, using the AT&T (GNU as) syntax
See http://www.muppetlabs.com/~breadbox/software/assembly.html
Expand All @@ -26,6 +25,10 @@ delphi/ by Cosmin Truta <[email protected]>
dotzlib/ by Henrik Ravn <[email protected]>
Support for Microsoft .Net and Visual C++ .Net

gcc_gvmat64/by Gilles Vollant <[email protected]>
GCC Version of x86 64-bit (AMD64 and Intel EM64t) code for x64
assembler to replace longest_match() and inflate_fast()

infback9/ by Mark Adler <[email protected]>
Unsupported diffs to infback to decode the deflate64 format

Expand All @@ -42,21 +45,19 @@ iostream3/ by Ludwig Schwardt <[email protected]>
and Kevin Ruland <[email protected]>
Yet another C++ I/O streams interface

masm686/ by Dan Higdon <[email protected]>
and Chuck Walbourn <[email protected]>
asm code for Pentium Pro/PII, using the MASM syntax

masmx64/ by Gilles Vollant <[email protected]>
x86 64-bit (AMD64 and Intel EM64t) code for x64 assembler to
replace longest_match() and inflate_fast()
x86 64-bit (AMD64 and Intel EM64t) code for x64 assembler to
replace longest_match() and inflate_fast(), also masm x86
64-bits translation of Chris Anderson inflate_fast()

masmx86/ by Gilles Vollant <[email protected]>
x86 asm code to replace longest_match() and inflate_fast(),
for Visual C++ and MASM
for Visual C++ and MASM (32 bits).
Based on Brian Raiter (asm686) and Chris Anderson (inflate86)

minizip/ by Gilles Vollant <[email protected]>
Mini zip and unzip based on zlib
Includes Zip64 support by Mathias Svensson <[email protected]>
Includes Zip64 support by Mathias Svensson <[email protected]>
See http://www.winimage.com/zLibDll/unzip.html

pascal/ by Bob Dellaca <[email protected]> et al.
Expand Down
Loading

0 comments on commit 67cc20d

Please sign in to comment.