zlib 1.2.4

This commit is contained in:
Mark Adler 2011-09-09 23:33:59 -07:00
parent 59ca2179ff
commit a1141160bc
14 changed files with 27 additions and 168 deletions

View File

@ -1,7 +1,7 @@
ChangeLog file for zlib
Changes in 1.2.4 (13 Mar 2010)
Changes in 1.2.4 (14 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
@ -30,6 +30,8 @@ Changes in 1.2.4 (13 Mar 2010)
- Fix name change from inflate.h in contrib/inflate86/inffas86.c
- Check if temporary file exists before removing in make_vms.com [Zinser]
- Fix make install and uninstall for --static option
- Fix usage of _MSC_VER in gzguts.h and zutil.h [Truta]
- Update readme.txt in contrib/masmx64 and masmx86 to assemble
Changes in 1.2.3.9 (21 Feb 2010)
- Expunge gzio.c

12
FAQ
View File

@ -25,7 +25,7 @@ The lastest zlib FAQ is at http://zlib.net/zlib_faq.html
4. compress() returns Z_BUF_ERROR.
Make sure that before the call of compress, the length of the compressed
Make sure that before the call of compress(), the length of the compressed
buffer is equal to the available size of the compressed buffer and not
zero. For Visual Basic, check that this parameter is passed by reference
("as any"), not by value ("as long").
@ -108,8 +108,8 @@ The lastest zlib FAQ is at http://zlib.net/zlib_faq.html
16. Can zlib decode Flate data in an Adobe PDF file?
Yes. See http://www.fastio.com/ (ClibPDF), or http://www.pdflib.com/ .
To modify PDF forms, see http://sourceforge.net/projects/acroformtool/ .
Yes. See http://www.pdflib.com/ . To modify PDF forms, see
http://sourceforge.net/projects/acroformtool/ .
17. Why am I getting this "register_frame_info not found" error on Solaris?
@ -152,8 +152,8 @@ The lastest zlib FAQ is at http://zlib.net/zlib_faq.html
Yes. However any library routines that zlib uses and any application-
provided memory allocation routines must also be thread-safe. zlib's gz*
functions use stdio library routines, and most of zlib's functions use the
library memory allocation routines by default. zlib's Init functions allow
for the application to provide custom memory allocation routines.
library memory allocation routines by default. zlib's *Init* functions
allow for the application to provide custom memory allocation routines.
Of course, you should only operate on any given zlib or gzip stream from a
single thread at a time.
@ -354,7 +354,7 @@ The lastest zlib FAQ is at http://zlib.net/zlib_faq.html
No. The files in contrib are not part of zlib. They were contributed by
other authors and are provided as a convenience to the user within the zlib
distribution. Each of the items in contrib have their own license.
distribution. Each item in contrib has its own license.
43. Is zlib subject to export controls? What is its ECCN?

View File

@ -64,7 +64,7 @@ unsigned short FAR *work;
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129,
130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132,
133, 133, 133, 133, 144, 198, 71};
133, 133, 133, 133, 144, 64, 195};
static const unsigned short dbase[32] = { /* Distance codes 0..31 base */
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49,
65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073,

View File

@ -12,7 +12,10 @@ inffasx64.asm and inffas8664.c were written by Chris Anderson, by optimizing
Use instructions
----------------
Copy these files into the zlib source directory.
Assemble the .asm files using MASM and put the object files into the zlib source
directory. You can also get object files here:
http://www.winimage.com/zLibDll/zlib124_masm_obj.zip
define ASMV and ASMINF in your project. Include inffas8664.c in your source tree,
and inffasx64.obj and gvmat64.obj as object to link.

View File

@ -7,9 +7,15 @@ longest_match() and inflate_fast().
Use instructions
----------------
Copy these files into the zlib source directory, then run the
appropriate makefile, as suggested below.
Assemble using MASM, and copy the object files into the zlib source
directory, then run the appropriate makefile, as suggested below. You can
donwload MASM from here:
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64
You can also get objects files here:
http://www.winimage.com/zLibDll/zlib124_masm_obj.zip
Build instructions
------------------

View File

@ -115,9 +115,7 @@ EXPORTS
; zlib1 v1.2.4 added:
adler32_combine @140
adler32_combine64 @141
crc32_combine @142
crc32_combine64 @143
deflateSetHeader @144
deflateTune @145
gzbuffer @146
@ -125,10 +123,6 @@ EXPORTS
gzclose_w @148
gzdirect @149
gzoffset @150
gzoffset64 @151
gzopen64 @152
gzseek64 @153
gztell64 @154
inflateGetHeader @156
inflateMark @157
inflatePrime @158

View File

@ -115,9 +115,7 @@ EXPORTS
; zlib1 v1.2.4 added:
adler32_combine @140
adler32_combine64 @141
crc32_combine @142
crc32_combine64 @143
deflateSetHeader @144
deflateTune @145
gzbuffer @146
@ -125,10 +123,6 @@ EXPORTS
gzclose_w @148
gzdirect @149
gzoffset @150
gzoffset64 @151
gzopen64 @152
gzseek64 @153
gztell64 @154
inflateGetHeader @156
inflateMark @157
inflatePrime @158

View File

@ -27,7 +27,7 @@
# define NO_GZCOMPRESS
#endif
#ifdef WIN32
#ifdef _MSC_VER
# include <io.h>
# define vsnprintf _vsnprintf
#endif

View File

@ -62,7 +62,7 @@ unsigned short FAR *work;
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 198, 71};
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 64, 195};
static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,

View File

@ -1,140 +0,0 @@
# Makefile for zlib, derived from Makefile.dj2.
# Modified for mingw32 by C. Spieler, 6/16/98.
# Updated for zlib 1.2.x by Christian Spieler and Cosmin Truta, Mar-2003.
# Last updated: 1-Aug-2003.
# Tested under Cygwin and MinGW.
# Copyright (C) 1995-2003 Jean-loup Gailly.
# For conditions of distribution and use, see copyright notice in zlib.h
# To compile, or to compile and test, type:
#
# make -fmakefile.gcc; make test testdll -fmakefile.gcc
#
# To use the asm code, type:
# cp contrib/asm?86/match.S ./match.S
# make LOC=-DASMV OBJA=match.o -fmakefile.gcc
#
# To install libz.a, zconf.h and zlib.h in the system directories, type:
#
# make install -fmakefile.gcc
# Note:
# If the platform is *not* MinGW (e.g. it is Cygwin or UWIN),
# the DLL name should be changed from "zlib1.dll".
STATICLIB = libz.a
SHAREDLIB = zlib1.dll
IMPLIB = libzdll.a
#LOC = -DASMV
#LOC = -DDEBUG -g
CC = gcc
CFLAGS = $(LOC) -O3 -Wall
AS = $(CC)
ASFLAGS = $(LOC) -Wall
LD = $(CC)
LDFLAGS = $(LOC) -s
AR = ar
ARFLAGS = rcs
RC = windres
RCFLAGS = --define GCC_WINDRES
CP = cp -fp
# If GNU install is available, replace $(CP) with install.
INSTALL = $(CP)
RM = rm -f
prefix = /usr/local
exec_prefix = $(prefix)
OBJS = adler32.o compress.o crc32.o deflate.o infback.o \
inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
OBJA =
all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) example minigzip example_d minigzip_d
test: example minigzip
./example
echo hello world | ./minigzip | ./minigzip -d
testdll: example_d minigzip_d
./example_d
echo hello world | ./minigzip_d | ./minigzip_d -d
.c.o:
$(CC) $(CFLAGS) -c -o $@ $<
.S.o:
$(AS) $(ASFLAGS) -c -o $@ $<
$(STATICLIB): $(OBJS) $(OBJA)
$(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA)
$(IMPLIB): $(SHAREDLIB)
$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlibrc.o
dllwrap --driver-name $(CC) --def win32/zlib.def \
--implib $(IMPLIB) -o $@ $(OBJS) $(OBJA) zlibrc.o
strip $@
example: example.o $(STATICLIB)
$(LD) $(LDFLAGS) -o $@ example.o $(STATICLIB)
minigzip: minigzip.o $(STATICLIB)
$(LD) $(LDFLAGS) -o $@ minigzip.o $(STATICLIB)
example_d: example.o $(IMPLIB)
$(LD) $(LDFLAGS) -o $@ example.o $(IMPLIB)
minigzip_d: minigzip.o $(IMPLIB)
$(LD) $(LDFLAGS) -o $@ minigzip.o $(IMPLIB)
zlibrc.o: win32/zlib1.rc
$(RC) $(RCFLAGS) -o $@ win32/zlib1.rc
# INCLUDE_PATH and LIBRARY_PATH must be set.
.PHONY: install uninstall clean
install: zlib.h zconf.h $(LIB)
-@if not exist $(INCLUDE_PATH)/nul mkdir $(INCLUDE_PATH)
-@if not exist $(LIBRARY_PATH)/nul mkdir $(LIBRARY_PATH)
-$(INSTALL) zlib.h $(INCLUDE_PATH)
-$(INSTALL) zconf.h $(INCLUDE_PATH)
-$(INSTALL) $(STATICLIB) $(LIBRARY_PATH)
-$(INSTALL) $(IMPLIB) $(LIBRARY_PATH)
uninstall:
-$(RM) $(INCLUDE_PATH)/zlib.h
-$(RM) $(INCLUDE_PATH)/zconf.h
-$(RM) $(LIBRARY_PATH)/$(STATICLIB)
-$(RM) $(LIBRARY_PATH)/$(IMPLIB)
clean:
-$(RM) $(STATICLIB)
-$(RM) $(SHAREDLIB)
-$(RM) $(IMPLIB)
-$(RM) *.o
-$(RM) *.exe
-$(RM) foo.gz
adler32.o: zlib.h zconf.h
compress.o: zlib.h zconf.h
crc32.o: crc32.h zlib.h zconf.h
deflate.o: deflate.h zutil.h zlib.h zconf.h
example.o: zlib.h zconf.h
inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
inftrees.o: zutil.h zlib.h zconf.h inftrees.h
minigzip.o: zlib.h zconf.h
trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
uncompr.o: zlib.h zconf.h
zutil.o: zutil.h zlib.h zconf.h

2
zlib.3
View File

@ -1,4 +1,4 @@
.TH ZLIB 3 "13 March 2010"
.TH ZLIB 3 "14 March 2010"
.SH NAME
zlib \- compression/decompression library
.SH SYNOPSIS

Binary file not shown.

2
zlib.h
View File

@ -1,5 +1,5 @@
/* zlib.h -- interface of the 'zlib' general purpose compression library
version 1.2.4, Mar 13th, 2010
version 1.2.4, Mar 14th, 2010
Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler

View File

@ -17,7 +17,7 @@
#include "zlib.h"
#ifdef STDC
# if !(defined(_WIN32_WCE) && defined(_MSV_VER))
# if !(defined(_WIN32_WCE) && defined(_MSC_VER))
# include <stddef.h>
# endif
# include <string.h>