diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:20:07 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:20:07 -0700 |
commit | 02b6cf579f02ec78c052735020a5d3c5723ed641 (patch) | |
tree | 6241259561d6def69639f52836675481f61105a0 | |
parent | 965fe72aed580d518c979c9a33b49e7df28205f7 (diff) | |
download | zlib-02b6cf579f02ec78c052735020a5d3c5723ed641.tar.gz zlib-02b6cf579f02ec78c052735020a5d3c5723ed641.tar.bz2 zlib-02b6cf579f02ec78c052735020a5d3c5723ed641.zip |
zlib 1.1.1v1.1.1
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | INDEX | 1 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | Makefile.in | 2 | ||||
-rw-r--r-- | README | 17 | ||||
-rw-r--r-- | deflate.c | 8 | ||||
-rw-r--r-- | deflate.h | 4 | ||||
-rw-r--r-- | inftrees.c | 2 | ||||
-rw-r--r-- | msdos/Makefile.w32 | 97 | ||||
-rw-r--r-- | msdos/zlib.def | 2 | ||||
-rw-r--r-- | msdos/zlib.rc | 6 | ||||
-rw-r--r-- | trees.c | 4 | ||||
-rw-r--r-- | zlib.3 | 4 | ||||
-rw-r--r-- | zlib.h | 4 |
14 files changed, 135 insertions, 28 deletions
@@ -1,7 +1,15 @@ | |||
1 | 1 | ||
2 | ChangeLog file for zlib | 2 | ChangeLog file for zlib |
3 | 3 | ||
4 | Changes in 1.1 (24 Feb 98) | 4 | Changes in 1.1.1 (27 Feb 98) |
5 | - fix macros _tr_tally_* in deflate.h for debug mode (Glenn Randers-Pehrson) | ||
6 | - remove block truncation heuristic which had very marginal effect for zlib | ||
7 | (smaller lit_bufsize than in gzip 1.2.4) and degraded a little the | ||
8 | compression ratio on some files. This also allows inlining _tr_tally for | ||
9 | matches in deflate_slow. | ||
10 | - added msdos/Makefile.w32 for WIN32 Microsoft Visual C++ (Bob Frazier) | ||
11 | |||
12 | Changes in 1.1.0 (24 Feb 98) | ||
5 | - do not return STREAM_END prematurely in inflate (John Bowler) | 13 | - do not return STREAM_END prematurely in inflate (John Bowler) |
6 | - revert to the zlib 1.0.8 inflate to avoid the gcc 2.8.0 bug (Jeremy Buhler) | 14 | - revert to the zlib 1.0.8 inflate to avoid the gcc 2.8.0 bug (Jeremy Buhler) |
7 | - compile with -DFASTEST to get compression code optimized for speed only | 15 | - compile with -DFASTEST to get compression code optimized for speed only |
@@ -13,6 +13,7 @@ descrip.mms makefile for Vax/VMS | |||
13 | zlib.3 mini man page for zlib (volunteers to write full | 13 | zlib.3 mini man page for zlib (volunteers to write full |
14 | man pages from zlib.h welcome. write to jloup@gzip.org) | 14 | man pages from zlib.h welcome. write to jloup@gzip.org) |
15 | 15 | ||
16 | msdos/Makefile.w32 makefile for Microsoft Visual C++ 32-bit | ||
16 | msdos/Makefile.b32 makefile for Borland C++ 32-bit | 17 | msdos/Makefile.b32 makefile for Borland C++ 32-bit |
17 | msdos/Makefile.bor makefile for Borland C/C++ 16-bit | 18 | msdos/Makefile.bor makefile for Borland C/C++ 16-bit |
18 | msdos/Makefile.dj2 makefile for DJGPP 2.x | 19 | msdos/Makefile.dj2 makefile for DJGPP 2.x |
@@ -23,7 +23,7 @@ CFLAGS=-O | |||
23 | LDFLAGS=-L. -lz | 23 | LDFLAGS=-L. -lz |
24 | LDSHARED=$(CC) | 24 | LDSHARED=$(CC) |
25 | 25 | ||
26 | VER=1.1.0 | 26 | VER=1.1.1 |
27 | LIBS=libz.a | 27 | LIBS=libz.a |
28 | SHAREDLIB=libz.so | 28 | SHAREDLIB=libz.so |
29 | 29 | ||
diff --git a/Makefile.in b/Makefile.in index 257f394..772bc31 100644 --- a/Makefile.in +++ b/Makefile.in | |||
@@ -23,7 +23,7 @@ CFLAGS=-O | |||
23 | LDFLAGS=-L. -lz | 23 | LDFLAGS=-L. -lz |
24 | LDSHARED=$(CC) | 24 | LDSHARED=$(CC) |
25 | 25 | ||
26 | VER=1.1.0 | 26 | VER=1.1.1 |
27 | LIBS=libz.a | 27 | LIBS=libz.a |
28 | SHAREDLIB=libz.so | 28 | SHAREDLIB=libz.so |
29 | 29 | ||
@@ -1,4 +1,4 @@ | |||
1 | zlib 1.1.0 is a general purpose data compression library. All the code | 1 | zlib 1.1.1 is a general purpose data compression library. All the code |
2 | is thread safe. The data format used by the zlib library | 2 | is thread safe. The data format used by the zlib library |
3 | is described by RFCs (Request for Comments) 1950 to 1952 in the files | 3 | is described by RFCs (Request for Comments) 1950 to 1952 in the files |
4 | ftp://ds.internic.net/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate | 4 | ftp://ds.internic.net/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate |
@@ -25,15 +25,14 @@ Mark Nelson wrote an article about zlib for the Jan. 1997 issue of | |||
25 | Dr. Dobb's Journal; a copy of the article is available in | 25 | Dr. Dobb's Journal; a copy of the article is available in |
26 | http://web2.airmail.net/markn/articles/zlibtool/zlibtool.htm | 26 | http://web2.airmail.net/markn/articles/zlibtool/zlibtool.htm |
27 | 27 | ||
28 | The changes made in version 1.1.0 are documented in the file ChangeLog. | 28 | The changes made in version 1.1.1 are documented in the file ChangeLog. |
29 | The main changes since 1.0.9 are: | 29 | The main changes since 1.1.0 are: |
30 | 30 | ||
31 | - do not return STREAM_END prematurely in inflate (John Bowler) | 31 | - fix macros _tr_tally_* in deflate.h for debug mode (Glenn Randers-Pehrson) |
32 | - revert to the zlib 1.0.8 inflate to avoid the gcc 2.8.0 bug (Jeremy Buhler) | 32 | - remove block truncation heuristic which had very marginal effect for zlib |
33 | - compile with -DFASTEST to get compression code optimized for speed only | 33 | (smaller lit_bufsize than in gzip 1.2.4) and degraded a little the |
34 | - in minigzip, try mmap'ing the input file first (Miguel Albrecht) | 34 | compression ratio on some files. This also allows inlining _tr_tally for |
35 | - increase size of I/O buffers in minigzip.c and gzio.c (not a big gain | 35 | matches in deflate_slow. |
36 | on Sun but significant on HP) | ||
37 | 36 | ||
38 | 37 | ||
39 | Unsupported third party contributions are provided in directory "contrib". | 38 | Unsupported third party contributions are provided in directory "contrib". |
@@ -52,7 +52,7 @@ | |||
52 | #include "deflate.h" | 52 | #include "deflate.h" |
53 | 53 | ||
54 | const char deflate_copyright[] = | 54 | const char deflate_copyright[] = |
55 | " deflate 1.1.0 Copyright 1995-1998 Jean-loup Gailly "; | 55 | " deflate 1.1.1 Copyright 1995-1998 Jean-loup Gailly "; |
56 | /* | 56 | /* |
57 | If you use the zlib library in a product, an acknowledgment is welcome | 57 | If you use the zlib library in a product, an acknowledgment is welcome |
58 | in the documentation of your product. If for some reason you cannot | 58 | in the documentation of your product. If for some reason you cannot |
@@ -1294,8 +1294,8 @@ local block_state deflate_slow(s, flush) | |||
1294 | 1294 | ||
1295 | check_match(s, s->strstart-1, s->prev_match, s->prev_length); | 1295 | check_match(s, s->strstart-1, s->prev_match, s->prev_length); |
1296 | 1296 | ||
1297 | bflush = _tr_tally(s, s->strstart -1 - s->prev_match, | 1297 | _tr_tally_dist(s, s->strstart -1 - s->prev_match, |
1298 | s->prev_length - MIN_MATCH); | 1298 | s->prev_length - MIN_MATCH, bflush); |
1299 | 1299 | ||
1300 | /* Insert in hash table all strings up to the end of the match. | 1300 | /* Insert in hash table all strings up to the end of the match. |
1301 | * strstart-1 and strstart are already inserted. If there is not | 1301 | * strstart-1 and strstart are already inserted. If there is not |
@@ -1322,7 +1322,7 @@ local block_state deflate_slow(s, flush) | |||
1322 | */ | 1322 | */ |
1323 | Tracevv((stderr,"%c", s->window[s->strstart-1])); | 1323 | Tracevv((stderr,"%c", s->window[s->strstart-1])); |
1324 | _tr_tally_lit(s, s->window[s->strstart-1], bflush); | 1324 | _tr_tally_lit(s, s->window[s->strstart-1], bflush); |
1325 | if (bflush) { | 1325 | if (bflush) { |
1326 | FLUSH_BLOCK_ONLY(s, 0); | 1326 | FLUSH_BLOCK_ONLY(s, 0); |
1327 | } | 1327 | } |
1328 | s->strstart++; | 1328 | s->strstart++; |
@@ -310,9 +310,9 @@ void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len, | |||
310 | flush = (s->last_lit == s->lit_bufsize-1); \ | 310 | flush = (s->last_lit == s->lit_bufsize-1); \ |
311 | } | 311 | } |
312 | #else | 312 | #else |
313 | # define _tr_tally_lit(s, c, flush) _tr_tally(s, 0, c, flush) | 313 | # define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c) |
314 | # define _tr_tally_dist(s, distance, length, flush) \ | 314 | # define _tr_tally_dist(s, distance, length, flush) \ |
315 | _tr_tally(s, distance, length, flush) | 315 | flush = _tr_tally(s, distance, length) |
316 | #endif | 316 | #endif |
317 | 317 | ||
318 | #endif | 318 | #endif |
@@ -7,7 +7,7 @@ | |||
7 | #include "inftrees.h" | 7 | #include "inftrees.h" |
8 | 8 | ||
9 | const char inflate_copyright[] = | 9 | const char inflate_copyright[] = |
10 | " inflate 1.1.0 Copyright 1995-1998 Mark Adler "; | 10 | " inflate 1.1.1 Copyright 1995-1998 Mark Adler "; |
11 | /* | 11 | /* |
12 | If you use the zlib library in a product, an acknowledgment is welcome | 12 | If you use the zlib library in a product, an acknowledgment is welcome |
13 | in the documentation of your product. If for some reason you cannot | 13 | in the documentation of your product. If for some reason you cannot |
diff --git a/msdos/Makefile.w32 b/msdos/Makefile.w32 new file mode 100644 index 0000000..d513c81 --- /dev/null +++ b/msdos/Makefile.w32 | |||
@@ -0,0 +1,97 @@ | |||
1 | # Makefile for zlib | ||
2 | # Microsoft 32-bit Visual C++ 4.0 or later (may work on earlier versions) | ||
3 | |||
4 | # To use, do "nmake /f makefile.w32" | ||
5 | |||
6 | # If you wish to reduce the memory requirements (default 256K for big | ||
7 | # objects plus a few K), you can add to CFLAGS below: | ||
8 | # -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 | ||
9 | # See zconf.h for details about the memory requirements. | ||
10 | |||
11 | # ------------- Microsoft Visual C++ 4.0 and later ------------- | ||
12 | MODEL= | ||
13 | CFLAGS=-Ox -GA3s -nologo -W3 | ||
14 | CC=cl | ||
15 | LD=link | ||
16 | LDFLAGS= | ||
17 | O=.obj | ||
18 | |||
19 | # variables | ||
20 | OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \ | ||
21 | trees$(O) | ||
22 | OBJP1 = adler32$(O)+compress$(O)+crc32$(O)+gzio$(O)+uncompr$(O)+deflate$(O)+\ | ||
23 | trees$(O) | ||
24 | OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \ | ||
25 | infutil$(O) inffast$(O) | ||
26 | OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\ | ||
27 | infutil$(O)+inffast$(O) | ||
28 | |||
29 | all: zlib.lib example.exe minigzip.exe | ||
30 | |||
31 | adler32.obj: adler32.c zutil.h zlib.h zconf.h | ||
32 | $(CC) -c $(CFLAGS) $*.c | ||
33 | |||
34 | compress.obj: compress.c zlib.h zconf.h | ||
35 | $(CC) -c $(CFLAGS) $*.c | ||
36 | |||
37 | crc32.obj: crc32.c zutil.h zlib.h zconf.h | ||
38 | $(CC) -c $(CFLAGS) $*.c | ||
39 | |||
40 | deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h | ||
41 | $(CC) -c $(CFLAGS) $*.c | ||
42 | |||
43 | gzio.obj: gzio.c zutil.h zlib.h zconf.h | ||
44 | $(CC) -c $(CFLAGS) $*.c | ||
45 | |||
46 | infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\ | ||
47 | infcodes.h infutil.h | ||
48 | $(CC) -c $(CFLAGS) $*.c | ||
49 | |||
50 | infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\ | ||
51 | infcodes.h inffast.h | ||
52 | $(CC) -c $(CFLAGS) $*.c | ||
53 | |||
54 | inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h | ||
55 | $(CC) -c $(CFLAGS) $*.c | ||
56 | |||
57 | inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h | ||
58 | $(CC) -c $(CFLAGS) $*.c | ||
59 | |||
60 | infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h | ||
61 | $(CC) -c $(CFLAGS) $*.c | ||
62 | |||
63 | inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h | ||
64 | $(CC) -c $(CFLAGS) $*.c | ||
65 | |||
66 | trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h | ||
67 | $(CC) -c $(CFLAGS) $*.c | ||
68 | |||
69 | uncompr.obj: uncompr.c zlib.h zconf.h | ||
70 | $(CC) -c $(CFLAGS) $*.c | ||
71 | |||
72 | zutil.obj: zutil.c zutil.h zlib.h zconf.h | ||
73 | $(CC) -c $(CFLAGS) $*.c | ||
74 | |||
75 | example.obj: example.c zlib.h zconf.h | ||
76 | $(CC) -c $(CFLAGS) $*.c | ||
77 | |||
78 | minigzip.obj: minigzip.c zlib.h zconf.h | ||
79 | $(CC) -c $(CFLAGS) $*.c | ||
80 | |||
81 | zlib.lib: $(OBJ1) $(OBJ2) | ||
82 | if exist zlib.lib del zlib.lib | ||
83 | lib /OUT:zlib.lib $(OBJ1) $(OBJ2) | ||
84 | |||
85 | example.exe: example.obj zlib.lib | ||
86 | $(LD) $(LDFLAGS) example.obj zlib.lib /OUT:example.exe /SUBSYSTEM:CONSOLE | ||
87 | |||
88 | minigzip.exe: minigzip.obj zlib.lib | ||
89 | $(LD) $(LDFLAGS) minigzip.obj zlib.lib /OUT:minigzip.exe /SUBSYSTEM:CONSOLE | ||
90 | |||
91 | test: example.exe minigzip.exe | ||
92 | example | ||
93 | echo hello world | minigzip | minigzip -d | ||
94 | |||
95 | #clean: | ||
96 | # del *.obj | ||
97 | # del *.exe | ||
diff --git a/msdos/zlib.def b/msdos/zlib.def index 2372ab1..e4edaad 100644 --- a/msdos/zlib.def +++ b/msdos/zlib.def | |||
@@ -8,7 +8,7 @@ SUBSYSTEM WINDOWS | |||
8 | 8 | ||
9 | STUB 'WINSTUB.EXE' | 9 | STUB 'WINSTUB.EXE' |
10 | 10 | ||
11 | VERSION 1.1 | 11 | VERSION 1.11 |
12 | 12 | ||
13 | CODE EXECUTE READ | 13 | CODE EXECUTE READ |
14 | 14 | ||
diff --git a/msdos/zlib.rc b/msdos/zlib.rc index 76e0ec2..2984720 100644 --- a/msdos/zlib.rc +++ b/msdos/zlib.rc | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | #define IDR_VERSION1 1 | 3 | #define IDR_VERSION1 1 |
4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE | 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE |
5 | FILEVERSION 1,1,0,0 | 5 | FILEVERSION 1,1,1,0 |
6 | PRODUCTVERSION 1,1,0,0 | 6 | PRODUCTVERSION 1,1,1,0 |
7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK | 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK |
8 | FILEFLAGS 0 | 8 | FILEFLAGS 0 |
9 | FILEOS VOS_DOS_WINDOWS32 | 9 | FILEOS VOS_DOS_WINDOWS32 |
@@ -17,7 +17,7 @@ BEGIN | |||
17 | 17 | ||
18 | BEGIN | 18 | BEGIN |
19 | VALUE "FileDescription", "zlib data compression library\0" | 19 | VALUE "FileDescription", "zlib data compression library\0" |
20 | VALUE "FileVersion", "1.1.0\0" | 20 | VALUE "FileVersion", "1.1.1\0" |
21 | VALUE "InternalName", "zlib\0" | 21 | VALUE "InternalName", "zlib\0" |
22 | VALUE "OriginalFilename", "zlib.dll\0" | 22 | VALUE "OriginalFilename", "zlib.dll\0" |
23 | VALUE "ProductName", "ZLib.DLL\0" | 23 | VALUE "ProductName", "ZLib.DLL\0" |
@@ -1042,8 +1042,9 @@ int _tr_tally (s, dist, lc) | |||
1042 | s->dyn_dtree[d_code(dist)].Freq++; | 1042 | s->dyn_dtree[d_code(dist)].Freq++; |
1043 | } | 1043 | } |
1044 | 1044 | ||
1045 | #ifdef TRUNCATE_BLOCK | ||
1045 | /* Try to guess if it is profitable to stop the current block here */ | 1046 | /* Try to guess if it is profitable to stop the current block here */ |
1046 | if (s->level > 2 && (s->last_lit & 0xfff) == 0) { | 1047 | if ((s->last_lit & 0x1fff) == 0 && s->level > 2) { |
1047 | /* Compute an upper bound for the compressed length */ | 1048 | /* Compute an upper bound for the compressed length */ |
1048 | ulg out_length = (ulg)s->last_lit*8L; | 1049 | ulg out_length = (ulg)s->last_lit*8L; |
1049 | ulg in_length = (ulg)((long)s->strstart - s->block_start); | 1050 | ulg in_length = (ulg)((long)s->strstart - s->block_start); |
@@ -1058,6 +1059,7 @@ int _tr_tally (s, dist, lc) | |||
1058 | 100L - out_length*100L/in_length)); | 1059 | 100L - out_length*100L/in_length)); |
1059 | if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1; | 1060 | if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1; |
1060 | } | 1061 | } |
1062 | #endif | ||
1061 | return (s->last_lit == s->lit_bufsize-1); | 1063 | return (s->last_lit == s->lit_bufsize-1); |
1062 | /* We avoid equality with lit_bufsize because of wraparound at 64K | 1064 | /* We avoid equality with lit_bufsize because of wraparound at 64K |
1063 | * on 16 bit machines and because stored blocks are restricted to | 1065 | * on 16 bit machines and because stored blocks are restricted to |
@@ -1,4 +1,4 @@ | |||
1 | .TH ZLIB 3 "24 February 1998" | 1 | .TH ZLIB 3 "27 February 1998" |
2 | .SH NAME | 2 | .SH NAME |
3 | zlib \- compression/decompression library | 3 | zlib \- compression/decompression library |
4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
@@ -81,7 +81,7 @@ These documents are also available in other formats from: | |||
81 | .IP | 81 | .IP |
82 | ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html | 82 | ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html |
83 | .SH AUTHORS | 83 | .SH AUTHORS |
84 | Version 1.1.0 | 84 | Version 1.1.1 |
85 | Copyright (C) 1995-1998 Jean-loup Gailly (jloup@gzip.org) | 85 | Copyright (C) 1995-1998 Jean-loup Gailly (jloup@gzip.org) |
86 | and Mark Adler (madler@alumni.caltech.edu). | 86 | and Mark Adler (madler@alumni.caltech.edu). |
87 | .LP | 87 | .LP |
@@ -1,5 +1,5 @@ | |||
1 | /* zlib.h -- interface of the 'zlib' general purpose compression library | 1 | /* zlib.h -- interface of the 'zlib' general purpose compression library |
2 | version 1.1.0, Feb 24th, 1998 | 2 | version 1.1.1, Feb 27th, 1998 |
3 | 3 | ||
4 | Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler | 4 | Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler |
5 | 5 | ||
@@ -37,7 +37,7 @@ extern "C" { | |||
37 | 37 | ||
38 | #include "zconf.h" | 38 | #include "zconf.h" |
39 | 39 | ||
40 | #define ZLIB_VERSION "1.1.0" | 40 | #define ZLIB_VERSION "1.1.1" |
41 | 41 | ||
42 | /* | 42 | /* |
43 | The 'zlib' compression library provides in-memory compression and | 43 | The 'zlib' compression library provides in-memory compression and |