Skip to content

Commit

Permalink
zlib 1.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
madler committed Sep 10, 2011
1 parent ebd3c2c commit 7850e4e
Show file tree
Hide file tree
Showing 58 changed files with 4,613 additions and 524 deletions.
92 changes: 91 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,13 +1,103 @@

ChangeLog file for zlib

Changes in 1.0.7 (20 Jan 1998)
- fix gzseek which was broken in write mode
- return error for gzseek to negative absolute position
- fix configure for Linux (Chun-Chung Chen)
- increase stack space for MSC (Tim Wegner)
- get_crc_table and inflateSyncPoint are EXPORTed (Gilles Vollant)
- define EXPORTVA for gzprintf (Gilles Vollant)
- added man page zlib.3 (Rick Rodgers)
- for contrib/untgz, fix makedir() and improve Makefile

- check gzseek in write mode in example.c
- allocate extra buffer for seeks only if gzseek is actually called
- avoid signed/unsigned comparisons (Tim Wegner, Gilles Vollant)
- add inflateSyncPoint in zconf.h
- fix list of exported functions in nt/zlib.dnt and mdsos/zlib.def

Changes in 1.0.6 (19 Jan 1998)
- add functions gzprintf, gzputc, gzgetc, gztell, gzeof, gzseek, gzrewind and
gzsetparams (thanks to Roland Giersig and Kevin Ruland for some of this code)
- Fix a deflate bug occuring only with compression level 0 (thanks to
Andy Buckler for finding this one).
- In minigzip, pass transparently also the first byte for .Z files.
- return Z_BUF_ERROR instead of Z_OK if output buffer full in uncompress()
- check Z_FINISH in inflate (thanks to Marc Schluper)
- Implement deflateCopy (thanks to Adam Costello)
- make static libraries by default in configure, add --shared option.
- move MSDOS or Windows specific files to directory msdos
- suppress the notion of partial flush to simplify the interface
(but the symbol Z_PARTIAL_FLUSH is kept for compatibility with 1.0.4)
- suppress history buffer provided by application to simplify the interface
(this feature was not implemented anyway in 1.0.4)
- next_in and avail_in must be initialized before calling inflateInit or
inflateInit2
- add EXPORT in all exported functions (for Windows DLL)
- added Makefile.nt (thanks to Stephen Williams)
- added the unsupported "contrib" directory:
contrib/asm386/ by Gilles Vollant <[email protected]>
386 asm code replacing longest_match().
contrib/iostream/ by Kevin Ruland <[email protected]>
A C++ I/O streams interface to the zlib gz* functions
contrib/iostream2/ by Tyge L�vset <[email protected]>
Another C++ I/O streams interface
contrib/untgz/ by "Pedro A. Aranda Guti\irrez" <[email protected]>
A very simple tar.gz file extractor using zlib
contrib/visual-basic.txt by Carlos Rios <[email protected]>
How to use compress(), uncompress() and the gz* functions from VB.
- pass params -f (filtered data), -h (huffman only), -1 to -9 (compression
level) in minigzip (thanks to Tom Lane)

- use const for rommable constants in deflate
- added test for gzseek and gztell in example.c
- add undocumented function inflateSyncPoint() (hack for Paul Mackerras)
- add undocumented function zError to convert error code to string
(for Tim Smithers)
- Allow compilation of gzio with -DNO_DEFLATE to avoid the compression code.
- Use default memcpy for Symantec MSDOS compiler.
- Add EXPORT keyword for check_func (needed for Windows DLL)
- add current directory to LD_LIBRARY_PATH for "make test"
- create also a link for libz.so.1
- added support for FUJITSU UXP/DS (thanks to Toshiaki Nomura)
- use $(SHAREDLIB) instead of libz.so in Makefile.in (for HPUX)
- added -soname for Linux in configure (Chun-Chung Chen,
- assign numbers to the exported functions in zlib.def (for Windows DLL)
- add advice in zlib.h for best usage of deflateSetDictionary
- work around compiler bug on Atari (cast Z_NULL in call of s->checkfn)
- allow compilation with ANSI keywords only enabled for TurboC in large model
- avoid "versionString"[0] (Borland bug)
- add NEED_DUMMY_RETURN for Borland
- use variable z_verbose for tracing in debug mode (Peter Deutsch).
- allow compilation with CC
- defined STDC for OS/2 (David Charlap)
- limit external names to 8 chars for MVS (Thomas Lund)
- in minigzip.c, use static buffers only for 16-bit systems
- fix suffix check for "minigzip -d foo.gz"
- do not return an error for the 2nd of two consecutive gzflush() (Felix Lee)
- use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau)
- added makelcc.bat for lcc-win32 (Tom St Denis)
- in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe)
- Avoid expanded $Id$. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion.
- check for unistd.h in configure (for off_t)
- use Tracev instead of Trace in infblock.c
- remove useless check parameter in inflate_blocks_free
- avoid useless assignment of s->check to itself in inflate_blocks_new
- do not flush twice in gzclose (thanks to Ken Raeburn)
- rename FOPEN as F_OPEN to avoid clash with /usr/include/sys/file.h
- use NO_ERRNO_H instead of enumeration of operating systems with errno.h
- work around buggy fclose on pipes for HP/UX
- support zlib DLL with BORLAND C++ 5.0 (thanks to Glenn Randers-Pehrson)
- fix configure if CC is already equal to gcc

Changes in 1.0.5 (3 Jan 98)
- Fix inflate to terminate gracefully when fed corrupted or invalid data
- Use const for rommable constants in inflate
- Eliminate memory leaks on error conditions in inflate
- Removed some vestigial code in inflate
- Update web address in README

Changes in 1.0.4 (24 Jul 96)
- In very rare conditions, deflate(s, Z_FINISH) could fail to produce an EOF
bit, so the decompressor could decompress all the correct data but went
Expand Down
61 changes: 42 additions & 19 deletions INDEX
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
ChangeLog history of changes
INDEX this file
Make_vms.com script for Vax/VMS
Makefile makefile for Unix (generated by configure)
Makefile.b32 makefile for Borland C++ 32-bit
Makefile.bor makefile for Borland C/C++ 16-bit
Makefile.dj2 makefile for DJGPP 2.x
Makefile.in makefile for Unix (template for configure)
Makefile.msc makefile for Microsoft C 16-bit
Makefile.riscos makefile for RISCOS
Makefile.sas makefile for Amiga SAS/C
Makefile.tc makefile for Turbo C
Makefile.wat makefile for Watcom C
README guess what
algorithm.doc description of the compression & decompression algorithms
configure configure script for Unix
descrip.mms makefile for Vax/VMS
zlib.def definition file for Windows DLL
zlib.rc definition file for Windows DLL
ChangeLog history of changes
INDEX this file
Make_vms.com script for Vax/VMS
Makefile makefile for Unix (generated by configure)
Makefile.in makefile for Unix (template for configure)
Makefile.msc makefile for Microsoft C 16-bit
Makefile.riscos makefile for RISCOS
Makefile.sas makefile for Amiga SAS/C
README guess what
algorithm.txt description of the (de)compression algorithm
configure configure script for Unix
descrip.mms makefile for Vax/VMS
zlib.3 mini man page for zlib (volunteers to write full
man pages from zlib.h welcome. write to [email protected])

msdos/Makefile.b32 makefile for Borland C++ 32-bit
msdos/Makefile.bor makefile for Borland C/C++ 16-bit
msdos/Makefile.dj2 makefile for DJGPP 2.x
msdos/Makefile.tc makefile for Turbo C
msdos/Makefile.wat makefile for Watcom C
msdos/zlib.def definition file for Windows DLL
msdos/zlib.rc definition file for Windows DLL

nt/Makefile.nt makefile for Windows NT
nt/zlib.dnt definition file for Windows NT DLL


zlib public header files (must be kept):
Expand Down Expand Up @@ -49,3 +55,20 @@ zutil.h
source files for sample programs:
example.c
minigzip.c

unsupported contribution by third parties

contrib/asm386/ by Gilles Vollant <[email protected]>
386 asm code replacing longest_match().

contrib/iostream/ by Kevin Ruland <[email protected]>
A C++ I/O streams interface to the zlib gz* functions

contrib/iostream2/ by Tyge L�vset <[email protected]>
Another C++ I/O streams interface

contrib/untgz/ by "Pedro A. Aranda Guti\irrez" <[email protected]>
A very simple tar.gz extractor using zlib

contrib/visual-basic.txt by Carlos Rios <[email protected]>
How to use compress(), uncompress() and the gz* functions from VB.
42 changes: 29 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ CFLAGS=-O
LDFLAGS=-L. -lz
LDSHARED=$(CC)

VER=1.0.5
VER=1.0.7
LIBS=libz.a
SHAREDLIB=libz.so

AR=ar rc
RANLIB=ranlib
TAR=tar
SHELL=/bin/sh

prefix=/usr/local
exec_prefix = $(prefix)
Expand All @@ -37,22 +39,30 @@ OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \

TEST_OBJS = example.o minigzip.o

DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] descrip.mms \
zlib.def zlib.rc algorithm.doc *.[ch]
DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] *.[ch] descrip.mms \
algorithm.txt zlib.3 msdos/Make*[a-z0-9] msdos/zlib.def msdos/zlib.rc \
nt/Makefile.nt nt/zlib.dnt contrib/README.contrib contrib/*.txt \
contrib/asm386/*.asm contrib/asm386/*.c \
contrib/asm386/*.bat contrib/asm386/*.mak contrib/iostream/*.cpp \
contrib/iostream/*.h contrib/iostream2/*.h contrib/iostream2/*.cpp \
contrib/untgz/Makefile contrib/untgz/*.c contrib/untgz/*.w32

all: example minigzip

test: all
./example
echo hello world | ./minigzip | ./minigzip -d
@LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
./example ; \
echo hello world | ./minigzip | ./minigzip -d

libz.a: $(OBJS)
$(AR) $@ $(OBJS)
-@ ($(RANLIB) $@ || true) 2>/dev/null
-@ ($(RANLIB) $@ || true) >/dev/null 2>&1

libz.so.$(VER): $(OBJS)
$(SHAREDLIB).$(VER): $(OBJS)
$(LDSHARED) -o $@ $(OBJS)
rm -f libz.so; ln -s $@ libz.so
rm -f $(SHAREDLIB) $(SHAREDLIB).1
ln -s $@ $(SHAREDLIB)
ln -s $@ $(SHAREDLIB).1

example: example.o $(LIBS)
$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
Expand All @@ -68,22 +78,28 @@ install: $(LIBS)
cp $(LIBS) $(exec_prefix)/lib
cd $(exec_prefix)/lib; chmod 644 $(LIBS)
-@(cd $(exec_prefix)/lib; $(RANLIB) libz.a || true) >/dev/null 2>&1
cd $(exec_prefix)/lib; if test -f libz.so.$(VER); then \
ln -s libz.so.$(VER) libz.so; \
cd $(exec_prefix)/lib; if test -f $(SHAREDLIB).$(VER); then \
rm -f $(SHAREDLIB) $(SHAREDLIB).1; \
ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB); \
ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB).1; \
(ldconfig || true) >/dev/null 2>&1; \
fi
# The ranlib in install is needed on NeXTSTEP which checks file times
# ldconfig is for Linux

uninstall:
cd $(exec_prefix)/lib; rm -f $(LIBS); \
if test -f libz.so; then \
if test -f $(SHAREDLIB); then \
v=`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p'<$(prefix)/include/zlib.h`;\
rm -f libz.so.$$v libz.so; \
rm -f $(SHAREDLIB).$$v $(SHAREDLIB); \
fi
cd $(prefix)/include; rm -f zlib.h zconf.h
cdz $(prefix)/include; rm -f zlib.h zconf.h

clean:
rm -f *.o *~ example minigzip libz.a libz.so* foo.gz

distclean: clean

zip:
mv Makefile Makefile~; cp -p Makefile.in Makefile
v=`sed -n -e 's/\.//g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\
Expand Down
42 changes: 29 additions & 13 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ CFLAGS=-O
LDFLAGS=-L. -lz
LDSHARED=$(CC)

VER=1.0.5
VER=1.0.7
LIBS=libz.a
SHAREDLIB=libz.so

AR=ar rc
RANLIB=ranlib
TAR=tar
SHELL=/bin/sh

prefix=/usr/local
exec_prefix = $(prefix)
Expand All @@ -37,22 +39,30 @@ OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \

TEST_OBJS = example.o minigzip.o

DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] descrip.mms \
zlib.def zlib.rc algorithm.doc *.[ch]
DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] *.[ch] descrip.mms \
algorithm.txt zlib.3 msdos/Make*[a-z0-9] msdos/zlib.def msdos/zlib.rc \
nt/Makefile.nt nt/zlib.dnt contrib/README.contrib contrib/*.txt \
contrib/asm386/*.asm contrib/asm386/*.c \
contrib/asm386/*.bat contrib/asm386/*.mak contrib/iostream/*.cpp \
contrib/iostream/*.h contrib/iostream2/*.h contrib/iostream2/*.cpp \
contrib/untgz/Makefile contrib/untgz/*.c contrib/untgz/*.w32

all: example minigzip

test: all
./example
echo hello world | ./minigzip | ./minigzip -d
@LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
./example ; \
echo hello world | ./minigzip | ./minigzip -d

libz.a: $(OBJS)
$(AR) $@ $(OBJS)
-@ ($(RANLIB) $@ || true) 2>/dev/null
-@ ($(RANLIB) $@ || true) >/dev/null 2>&1

libz.so.$(VER): $(OBJS)
$(SHAREDLIB).$(VER): $(OBJS)
$(LDSHARED) -o $@ $(OBJS)
rm -f libz.so; ln -s $@ libz.so
rm -f $(SHAREDLIB) $(SHAREDLIB).1
ln -s $@ $(SHAREDLIB)
ln -s $@ $(SHAREDLIB).1

example: example.o $(LIBS)
$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
Expand All @@ -68,22 +78,28 @@ install: $(LIBS)
cp $(LIBS) $(exec_prefix)/lib
cd $(exec_prefix)/lib; chmod 644 $(LIBS)
-@(cd $(exec_prefix)/lib; $(RANLIB) libz.a || true) >/dev/null 2>&1
cd $(exec_prefix)/lib; if test -f libz.so.$(VER); then \
ln -s libz.so.$(VER) libz.so; \
cd $(exec_prefix)/lib; if test -f $(SHAREDLIB).$(VER); then \
rm -f $(SHAREDLIB) $(SHAREDLIB).1; \
ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB); \
ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB).1; \
(ldconfig || true) >/dev/null 2>&1; \
fi
# The ranlib in install is needed on NeXTSTEP which checks file times
# ldconfig is for Linux

uninstall:
cd $(exec_prefix)/lib; rm -f $(LIBS); \
if test -f libz.so; then \
if test -f $(SHAREDLIB); then \
v=`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p'<$(prefix)/include/zlib.h`;\
rm -f libz.so.$$v libz.so; \
rm -f $(SHAREDLIB).$$v $(SHAREDLIB); \
fi
cd $(prefix)/include; rm -f zlib.h zconf.h
cdz $(prefix)/include; rm -f zlib.h zconf.h

clean:
rm -f *.o *~ example minigzip libz.a libz.so* foo.gz

distclean: clean

zip:
mv Makefile Makefile~; cp -p Makefile.in Makefile
v=`sed -n -e 's/\.//g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\
Expand Down
Loading

0 comments on commit 7850e4e

Please sign in to comment.