summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--FAQ88
-rw-r--r--Makefile2
-rw-r--r--Makefile.in2
-rw-r--r--README6
-rw-r--r--as400/zlib.inc6
-rw-r--r--contrib/infback9/inftree9.c4
-rw-r--r--contrib/puff/puff.c8
-rw-r--r--deflate.c2
-rw-r--r--inftrees.c16
-rw-r--r--qnx/package.qpg10
-rw-r--r--win32/zlib1.rc8
-rw-r--r--zlib.36
-rw-r--r--zlib.h8
14 files changed, 107 insertions, 66 deletions
diff --git a/ChangeLog b/ChangeLog
index 48e465f..1b69391 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,13 @@
1 1
2 ChangeLog file for zlib 2 ChangeLog file for zlib
3 3
4Changes in 1.2.1.1 (9 January 2004)
5- Updated email address in README
6- Several FAQ updates
7- Fixed a big fat bug in inftrees.c that prevented decoding valid
8 dynamic blocks with only literals and no distance codes.
9- Add a note to puff.c on no distance codes case.
10
4Changes in 1.2.1 (17 November 2003) 11Changes in 1.2.1 (17 November 2003)
5- Remove a tab in contrib/gzappend/gzappend.c 12- Remove a tab in contrib/gzappend/gzappend.c
6- Update some interfaces in contrib for new zlib functions 13- Update some interfaces in contrib for new zlib functions
diff --git a/FAQ b/FAQ
index 7115ec3..578dbc2 100644
--- a/FAQ
+++ b/FAQ
@@ -21,18 +21,18 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
21 3. Where can I get a Visual Basic interface to zlib? 21 3. Where can I get a Visual Basic interface to zlib?
22 22
23 See 23 See
24 * http://www.winimage.com/zLibDll/
25 * http://www.dogma.net/markn/articles/zlibtool/zlibtool.htm 24 * http://www.dogma.net/markn/articles/zlibtool/zlibtool.htm
26 * contrib/visual-basic.txt in the zlib distribution 25 * contrib/visual-basic.txt in the zlib distribution
26 * win32/DLL_FAQ.txt in the zlib distribution
27 27
28 4. compress() returns Z_BUF_ERROR 28 4. compress() returns Z_BUF_ERROR.
29 29
30 Make sure that before the call of compress, the length of the compressed 30 Make sure that before the call of compress, the length of the compressed
31 buffer is equal to the total size of the compressed buffer and not 31 buffer is equal to the total size of the compressed buffer and not
32 zero. For Visual Basic, check that this parameter is passed by reference 32 zero. For Visual Basic, check that this parameter is passed by reference
33 ("as any"), not by value ("as long"). 33 ("as any"), not by value ("as long").
34 34
35 5. deflate() or inflate() returns Z_BUF_ERROR 35 5. deflate() or inflate() returns Z_BUF_ERROR.
36 36
37 Before making the call, make sure that avail_in and avail_out are not 37 Before making the call, make sure that avail_in and avail_out are not
38 zero. When setting the parameter flush equal to Z_FINISH, also make sure 38 zero. When setting the parameter flush equal to Z_FINISH, also make sure
@@ -47,8 +47,8 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
47 47
48 It's in zlib.h for the moment, and Francis S. Lin has converted it to a 48 It's in zlib.h for the moment, and Francis S. Lin has converted it to a
49 web page zlib.html. Volunteers to transform this to Unix-style man pages, 49 web page zlib.html. Volunteers to transform this to Unix-style man pages,
50 please contact Jean-loup Gailly (jloup@gzip.org). Examples of zlib usage 50 please contact us (zlib@gzip.org). Examples of zlib usage are in the files
51 are in the files example.c and minigzip.c. 51 example.c and minigzip.c.
52 52
53 7. Why don't you use GNU autoconf or libtool or ...? 53 7. Why don't you use GNU autoconf or libtool or ...?
54 54
@@ -77,7 +77,8 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
77 77
7811. Can zlib handle .zip archives? 7811. Can zlib handle .zip archives?
79 79
80 See the directory contrib/minizip in the zlib distribution. 80 Not by itself, no. See the directory contrib/minizip in the zlib
81 distribution.
81 82
8212. Can zlib handle .Z files? 8312. Can zlib handle .Z files?
83 84
@@ -92,6 +93,8 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
92 93
9314. How do I install a shared zlib library on Unix? 9414. How do I install a shared zlib library on Unix?
94 95
96 After the above, then:
97
95 make install 98 make install
96 99
97 However, many flavors of Unix come with a shared zlib already installed. 100 However, many flavors of Unix come with a shared zlib already installed.
@@ -99,12 +102,31 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
99 trying to install it, you may want to check if it's already there! If you 102 trying to install it, you may want to check if it's already there! If you
100 can #include <zlib.h>, it's there. The -lz option will probably link to it. 103 can #include <zlib.h>, it's there. The -lz option will probably link to it.
101 104
10215. I have a question about OttoPDF 10515. I have a question about OttoPDF.
103 106
104 We are not the authors of OttoPDF. The real author is on the OttoPDF web 107 We are not the authors of OttoPDF. The real author is on the OttoPDF web
105 site Joel Hainley jhainley@myndkryme.com. 108 site: Joel Hainley, jhainley@myndkryme.com.
109
11016. Can zlib decode Flate data in an Adobe PDF file?
111
112 Yes. See http://www.fastio.com/ (ClibPDF), or http://www.pdflib.com/ .
113 To modify PDF forms, see http://sourceforge.net/projects/acroformtool/ .
114
11517. Why am I getting this "register_frame_info not found" error on Solaris?
116
117 After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib
118 generates an error such as:
119
120 ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so:
121 symbol __register_frame_info: referenced symbol not found
122
123 The symbol __register_frame_info is not part of zlib, it is generated by
124 the C compiler (cc or gcc). You must recompile applications using zlib
125 which have this problem. This problem is specific to Solaris. See
126 http://www.sunfreeware.com for Solaris versions of zlib and applications
127 using zlib.
106 128
10716. Why does gzip give an error on a file I make with compress/deflate? 12918. Why does gzip give an error on a file I make with compress/deflate?
108 130
109 The compress and deflate functions produce data in the zlib format, which 131 The compress and deflate functions produce data in the zlib format, which
110 is different and incompatible with the gzip format. The gz* functions in 132 is different and incompatible with the gzip format. The gz* functions in
@@ -112,7 +134,7 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
112 formats use the same compressed data format internally, but have different 134 formats use the same compressed data format internally, but have different
113 headers and trailers around the compressed data. 135 headers and trailers around the compressed data.
114 136
11517. Ok, so why are there two different formats? 13719. Ok, so why are there two different formats?
116 138
117 The gzip format was designed to retain the directory information about 139 The gzip format was designed to retain the directory information about
118 a single file, such as the name and last modification date. The zlib 140 a single file, such as the name and last modification date. The zlib
@@ -120,7 +142,7 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
120 channel applications, and has a much more compact header and trailer and 142 channel applications, and has a much more compact header and trailer and
121 uses a faster integrity check than gzip. 143 uses a faster integrity check than gzip.
122 144
12318. Well that's nice, but how do I make a gzip file in memory? 14520. Well that's nice, but how do I make a gzip file in memory?
124 146
125 You can request that deflate write the gzip format instead of the zlib 147 You can request that deflate write the gzip format instead of the zlib
126 format using deflateInit2(). You can also request that inflate decode 148 format using deflateInit2(). You can also request that inflate decode
@@ -133,7 +155,7 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
133 function and roll your own gzip encoding and decoding. Read the gzip 155 function and roll your own gzip encoding and decoding. Read the gzip
134 RFC 1952 for details of the header and trailer format. 156 RFC 1952 for details of the header and trailer format.
135 157
13619. Is zlib thread-safe? 15821. Is zlib thread-safe?
137 159
138 Yes. However any library routines that zlib uses and any application- 160 Yes. However any library routines that zlib uses and any application-
139 provided memory allocation routines must also be thread-safe. zlib's gz* 161 provided memory allocation routines must also be thread-safe. zlib's gz*
@@ -144,15 +166,15 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
144 Of course, you should only operate on any given zlib or gzip stream from a 166 Of course, you should only operate on any given zlib or gzip stream from a
145 single thread at a time. 167 single thread at a time.
146 168
14720. Can I use zlib in my commercial application? 16922. Can I use zlib in my commercial application?
148 170
149 Yes. Please read the license in zlib.h. 171 Yes. Please read the license in zlib.h.
150 172
15121. Is zlib under the GNU license? 17323. Is zlib under the GNU license?
152 174
153 No. Please read the license in zlib.h. 175 No. Please read the license in zlib.h.
154 176
15522. The license says that altered source versions must be "plainly marked". So 17724. The license says that altered source versions must be "plainly marked". So
156 what exactly do I need to do to meet that requirement? 178 what exactly do I need to do to meet that requirement?
157 179
158 You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In 180 You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In
@@ -175,24 +197,24 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
175 ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes 197 ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes
176 in zlib.h as you would for a full source distribution. 198 in zlib.h as you would for a full source distribution.
177 199
17823. Will zlib work on a big-endian or little-endian architecture, and can I 20025. Will zlib work on a big-endian or little-endian architecture, and can I
179 exchange compressed data between them? 201 exchange compressed data between them?
180 202
181 Yes and yes. 203 Yes and yes.
182 204
18324. Will zlib work on a 64-bit machine? 20526. Will zlib work on a 64-bit machine?
184 206
185 It should. It has been tested on 64-bit machines, and has no dependence 207 It should. It has been tested on 64-bit machines, and has no dependence
186 on any data types being limited to 32-bits in length. If you have any 208 on any data types being limited to 32-bits in length. If you have any
187 difficulties, please provide a complete problem report to zlib@gzip.org 209 difficulties, please provide a complete problem report to zlib@gzip.org
188 210
18925. Will zlib decompress data from the PKWare Data Compression Library? 21127. Will zlib decompress data from the PKWare Data Compression Library?
190 212
191 No. The PKWare DCL uses a completely different compressed data format 213 No. The PKWare DCL uses a completely different compressed data format
192 than does PKZIP and zlib. However, you can look in zlib's contrib/blast 214 than does PKZIP and zlib. However, you can look in zlib's contrib/blast
193 directory for a possible solution to your problem. 215 directory for a possible solution to your problem.
194 216
19526. Can I access data randomly in a compressed stream? 21728. Can I access data randomly in a compressed stream?
196 218
197 No, not without some preparation. If when compressing you periodically 219 No, not without some preparation. If when compressing you periodically
198 use Z_FULL_FLUSH, carefully write all the pending data at those points, 220 use Z_FULL_FLUSH, carefully write all the pending data at those points,
@@ -200,27 +222,27 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
200 at those points. You have to be careful to not use Z_FULL_FLUSH too 222 at those points. You have to be careful to not use Z_FULL_FLUSH too
201 often, since it can significantly degrade compression. 223 often, since it can significantly degrade compression.
202 224
20327. Does zlib work on MVS, OS/390, CICS, etc.? 22529. Does zlib work on MVS, OS/390, CICS, etc.?
204 226
205 We don't know for sure. We have heard occasional reports of success on 227 We don't know for sure. We have heard occasional reports of success on
206 these systems. If you do use it on one of these, please provide us with 228 these systems. If you do use it on one of these, please provide us with
207 a report, instructions, and patches that we can reference when we get 229 a report, instructions, and patches that we can reference when we get
208 these questions. Thanks. 230 these questions. Thanks.
209 231
21028. Is there some simpler, easier to read version of inflate I can look at 23230. Is there some simpler, easier to read version of inflate I can look at
211 to understand the deflate format? 233 to understand the deflate format?
212 234
213 First off, you should read RFC 1951. Second, yes. Look in zlib's 235 First off, you should read RFC 1951. Second, yes. Look in zlib's
214 contrib/puff directory. 236 contrib/puff directory.
215 237
21629. Does zlib infringe on any patents? 23831. Does zlib infringe on any patents?
217 239
218 As far as we know, no. In fact, that was originally the whole point behind 240 As far as we know, no. In fact, that was originally the whole point behind
219 zlib. Look here for some more information: 241 zlib. Look here for some more information:
220 242
221 http://www.gzip.org/#faq11 243 http://www.gzip.org/#faq11
222 244
22330. Can zlib work with greater than 4 GB of data? 24532. Can zlib work with greater than 4 GB of data?
224 246
225 Yes. inflate() and deflate() will process any amount of data correctly. 247 Yes. inflate() and deflate() will process any amount of data correctly.
226 Each call of inflate() or deflate() is limited to input and output chunks 248 Each call of inflate() or deflate() is limited to input and output chunks
@@ -238,7 +260,7 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
238 only if the compiler's "long" type is 32 bits. If the compiler's "long" 260 only if the compiler's "long" type is 32 bits. If the compiler's "long"
239 type is 64 bits, then the limit is 16 exabytes. 261 type is 64 bits, then the limit is 16 exabytes.
240 262
24131. Does zlib have any security vulnerabilities? 26333. Does zlib have any security vulnerabilities?
242 264
243 The only one that we are aware of is potentially in gzprintf(). If zlib 265 The only one that we are aware of is potentially in gzprintf(). If zlib
244 is compiled to use sprintf() or vsprintf(), then there is no protection 266 is compiled to use sprintf() or vsprintf(), then there is no protection
@@ -258,35 +280,35 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
258 Note that you should be using the most recent version of zlib. Versions 280 Note that you should be using the most recent version of zlib. Versions
259 1.1.3 and before were subject to a double-free vulnerability. 281 1.1.3 and before were subject to a double-free vulnerability.
260 282
26132. Is there a Java version of zlib? 28334. Is there a Java version of zlib?
262 284
263 Probably what you want is to use zlib in Java. zlib is already included 285 Probably what you want is to use zlib in Java. zlib is already included
264 as part of the Java SDK in the java.util.zip package. If you really want 286 as part of the Java SDK in the java.util.zip package. If you really want
265 a version of zlib written in the Java language, look on the zlib home 287 a version of zlib written in the Java language, look on the zlib home
266 page for links: http://www.zlib.org/ 288 page for links: http://www.zlib.org/
267 289
26833. I get this or that compiler or source-code scanner warning when I crank it 29035. I get this or that compiler or source-code scanner warning when I crank it
269 up to maximally-pendantic. Can't you guys write proper code? 291 up to maximally-pedantic. Can't you guys write proper code?
270 292
271 Many years ago, we gave up attempting to avoid warnings on every compiler 293 Many years ago, we gave up attempting to avoid warnings on every compiler
272 in the universe. It just got to be a waste of time, and some compilers 294 in the universe. It just got to be a waste of time, and some compilers
273 were downright silly. So now, we simply make sure that the code always 295 were downright silly. So now, we simply make sure that the code always
274 works. 296 works.
275 297
27634. Will zlib read the (insert any ancient or arcane format here) compressed 29836. Will zlib read the (insert any ancient or arcane format here) compressed
277 data format? 299 data format?
278 300
279 Probably not. Look in the comp.compression FAQ for pointers to various 301 Probably not. Look in the comp.compression FAQ for pointers to various
280 formats and associated software. 302 formats and associated software.
281 303
28235. How can I encrypt/decrypt zip files with zlib? 30437. How can I encrypt/decrypt zip files with zlib?
283 305
284 zlib doesn't support encryption. The original PKZIP encryption is very weak 306 zlib doesn't support encryption. The original PKZIP encryption is very weak
285 and can be broken with freely available programs. To get strong encryption, 307 and can be broken with freely available programs. To get strong encryption,
286 use gpg ( http://www.gnupg.org/ ) which already includes zlib compression. 308 use GnuPG, http://www.gnupg.org/ , which already includes zlib compression.
287 For PKZIP compatible "encryption", look at http://www.info-zip.org/ 309 For PKZIP compatible "encryption", look at http://www.info-zip.org/
288 310
28936. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings? 31138. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
290 312
291 "gzip" is the gzip format, and "deflate" is the zlib format. They should 313 "gzip" is the gzip format, and "deflate" is the zlib format. They should
292 probably have called the second one "zlib" instead to avoid confusion 314 probably have called the second one "zlib" instead to avoid confusion
@@ -302,14 +324,14 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
302 324
303 Bottom line: use the gzip format for HTTP 1.1 encoding. 325 Bottom line: use the gzip format for HTTP 1.1 encoding.
304 326
30537. Does zlib support the new "Deflate64" format introduced by PKWare? 32739. Does zlib support the new "Deflate64" format introduced by PKWare?
306 328
307 No. PKWare has apparently decided to keep that format proprietary, since 329 No. PKWare has apparently decided to keep that format proprietary, since
308 they have not documented it as they have previous compression formats. 330 they have not documented it as they have previous compression formats.
309 In any case, the compression improvements are so modest compared to other 331 In any case, the compression improvements are so modest compared to other
310 more modern approaches, that it's not worth the effort to implement. 332 more modern approaches, that it's not worth the effort to implement.
311 333
31238. Can you please sign these lengthy legal documents and fax them back to us 33440. Can you please sign these lengthy legal documents and fax them back to us
313 so that we can use your software in our product? 335 so that we can use your software in our product?
314 336
315 No. Go away. Shoo. 337 No. Go away. Shoo.
diff --git a/Makefile b/Makefile
index ab4611b..33420fd 100644
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,7 @@ CPP=$(CC) -E
30 30
31LIBS=libz.a 31LIBS=libz.a
32SHAREDLIB=libz.so 32SHAREDLIB=libz.so
33SHAREDLIBV=libz.so.1.2.1 33SHAREDLIBV=libz.so.1.2.1.1
34SHAREDLIBM=libz.so.1 34SHAREDLIBM=libz.so.1
35 35
36AR=ar rc 36AR=ar rc
diff --git a/Makefile.in b/Makefile.in
index ab4611b..33420fd 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -30,7 +30,7 @@ CPP=$(CC) -E
30 30
31LIBS=libz.a 31LIBS=libz.a
32SHAREDLIB=libz.so 32SHAREDLIB=libz.so
33SHAREDLIBV=libz.so.1.2.1 33SHAREDLIBV=libz.so.1.2.1.1
34SHAREDLIBM=libz.so.1 34SHAREDLIBM=libz.so.1
35 35
36AR=ar rc 36AR=ar rc
diff --git a/README b/README
index 0f12054..ffcf1c4 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
1ZLIB DATA COMPRESSION LIBRARY 1ZLIB DATA COMPRESSION LIBRARY
2 2
3zlib 1.2.1 is a general purpose data compression library. All the code is 3zlib 1.2.1.1 is a general purpose data compression library. All the code is
4thread safe. The data format used by the zlib library is described by RFCs 4thread safe. The data format used by the zlib library is described by RFCs
5(Request for Comments) 1950 to 1952 in the files 5(Request for Comments) 1950 to 1952 in the files
6http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) 6http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
@@ -34,7 +34,7 @@ Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
34issue of Dr. Dobb's Journal; a copy of the article is available in 34issue of Dr. Dobb's Journal; a copy of the article is available in
35http://dogma.net/markn/articles/zlibtool/zlibtool.htm 35http://dogma.net/markn/articles/zlibtool/zlibtool.htm
36 36
37The changes made in version 1.2.1 are documented in the file ChangeLog. 37The changes made in version 1.2.1.1 are documented in the file ChangeLog.
38 38
39Unsupported third party contributions are provided in directory "contrib". 39Unsupported third party contributions are provided in directory "contrib".
40 40
@@ -46,7 +46,7 @@ A Perl interface to zlib written by Paul Marquess <pmqs@cpan.org> is in the
46CPAN (Comprehensive Perl Archive Network) sites 46CPAN (Comprehensive Perl Archive Network) sites
47http://www.cpan.org/modules/by-module/Compress/ 47http://www.cpan.org/modules/by-module/Compress/
48 48
49A Python interface to zlib written by A.M. Kuchling <amk@magnet.com> is 49A Python interface to zlib written by A.M. Kuchling <amk@amk.ca> is
50available in Python 1.5 and later versions, see 50available in Python 1.5 and later versions, see
51http://www.python.org/doc/lib/module-zlib.html 51http://www.python.org/doc/lib/module-zlib.html
52 52
diff --git a/as400/zlib.inc b/as400/zlib.inc
index 03c6cf0..de07084 100644
--- a/as400/zlib.inc
+++ b/as400/zlib.inc
@@ -1,7 +1,7 @@
1 * ZLIB.INC - Interface to the general purpose compression library 1 * ZLIB.INC - Interface to the general purpose compression library
2 * 2 *
3 * ILE RPG400 version by Patrick Monnerat, DATASPHERE. 3 * ILE RPG400 version by Patrick Monnerat, DATASPHERE.
4 * Version 1.2.1 4 * Version 1.2.1.1
5 * 5 *
6 * 6 *
7 * WARNING: 7 * WARNING:
@@ -20,8 +20,8 @@
20 * Constants 20 * Constants
21 ************************************************************************** 21 **************************************************************************
22 * 22 *
23 D ZLIB_VERSION C '1.2.1' Header's version 23 D ZLIB_VERSION C '1.2.1.1' Header's version
24 D ZLIB_VERNUM C X'1210' 24 D ZLIB_VERNUM C X'1211'
25 * 25 *
26 D Z_NO_FLUSH C 0 26 D Z_NO_FLUSH C 0
27 D Z_SYNC_FLUSH C 2 27 D Z_SYNC_FLUSH C 2
diff --git a/contrib/infback9/inftree9.c b/contrib/infback9/inftree9.c
index fe76a1b..337a277 100644
--- a/contrib/infback9/inftree9.c
+++ b/contrib/infback9/inftree9.c
@@ -9,7 +9,7 @@
9#define MAXBITS 15 9#define MAXBITS 15
10 10
11const char inflate9_copyright[] = 11const char inflate9_copyright[] =
12 " inflate9 1.2.1 Copyright 1995-2003 Mark Adler "; 12 " inflate9 1.2.1.1 Copyright 1995-2003 Mark Adler ";
13/* 13/*
14 If you use the zlib library in a product, an acknowledgment is welcome 14 If you use the zlib library in a product, an acknowledgment is welcome
15 in the documentation of your product. If for some reason you cannot 15 in the documentation of your product. If for some reason you cannot
@@ -64,7 +64,7 @@ unsigned short FAR *work;
64 static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 64 static const unsigned short lext[31] = { /* Length codes 257..285 extra */
65 128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129, 65 128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129,
66 130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132, 66 130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132,
67 133, 133, 133, 133, 144, 76, 66}; 67 133, 133, 133, 133, 144, 202, 196};
68 static const unsigned short dbase[32] = { /* Distance codes 0..31 base */ 68 static const unsigned short dbase[32] = { /* Distance codes 0..31 base */
69 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 69 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49,
70 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 70 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073,
diff --git a/contrib/puff/puff.c b/contrib/puff/puff.c
index 7a8116b..ce0cc40 100644
--- a/contrib/puff/puff.c
+++ b/contrib/puff/puff.c
@@ -1,8 +1,8 @@
1/* 1/*
2 * puff.c 2 * puff.c
3 * Copyright (C) 2002, 2003 Mark Adler 3 * Copyright (C) 2002-2004 Mark Adler
4 * For conditions of distribution and use, see copyright notice in puff.h 4 * For conditions of distribution and use, see copyright notice in puff.h
5 * version 1.7, 3 Mar 2003 5 * version 1.8, 9 Jan 2004
6 * 6 *
7 * puff.c is a simple inflate written to be an unambiguous way to specify the 7 * puff.c is a simple inflate written to be an unambiguous way to specify the
8 * deflate format. It is not written for speed but rather simplicity. As a 8 * deflate format. It is not written for speed but rather simplicity. As a
@@ -60,6 +60,7 @@
60 * 1.6 7 Aug 2002 - Minor format changes 60 * 1.6 7 Aug 2002 - Minor format changes
61 * 1.7 3 Mar 2003 - Added test code for distribution 61 * 1.7 3 Mar 2003 - Added test code for distribution
62 * - Added zlib-like license 62 * - Added zlib-like license
63 * 1.8 9 Jan 2004 - Added some comments on no distance codes case
63 */ 64 */
64 65
65#include <setjmp.h> /* for setjmp(), longjmp(), and jmp_buf */ 66#include <setjmp.h> /* for setjmp(), longjmp(), and jmp_buf */
@@ -577,6 +578,9 @@ local int fixed(struct state *s)
577 * block is fewer bits), but it is allowed by the format. So incomplete 578 * block is fewer bits), but it is allowed by the format. So incomplete
578 * literal/length codes of one symbol should also be permitted. 579 * literal/length codes of one symbol should also be permitted.
579 * 580 *
581 * - If there are only literal codes and no lengths, then there are no distance
582 * codes. This is represented by one distance code with zero bits.
583 *
580 * - The list of up to 286 length/literal lengths and up to 30 distance lengths 584 * - The list of up to 286 length/literal lengths and up to 30 distance lengths
581 * are themselves compressed using Huffman codes and run-length encoding. In 585 * are themselves compressed using Huffman codes and run-length encoding. In
582 * the list of code lengths, a 0 symbol means no code, a 1..15 symbol means 586 * the list of code lengths, a 0 symbol means no code, a 1..15 symbol means
diff --git a/deflate.c b/deflate.c
index 0525b2f..ada7cfd 100644
--- a/deflate.c
+++ b/deflate.c
@@ -52,7 +52,7 @@
52#include "deflate.h" 52#include "deflate.h"
53 53
54const char deflate_copyright[] = 54const char deflate_copyright[] =
55 " deflate 1.2.1 Copyright 1995-2003 Jean-loup Gailly "; 55 " deflate 1.2.1.1 Copyright 1995-2003 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
diff --git a/inftrees.c b/inftrees.c
index 3bb5639..767ae1f 100644
--- a/inftrees.c
+++ b/inftrees.c
@@ -1,5 +1,5 @@
1/* inftrees.c -- generate Huffman trees for efficient decoding 1/* inftrees.c -- generate Huffman trees for efficient decoding
2 * Copyright (C) 1995-2003 Mark Adler 2 * Copyright (C) 1995-2004 Mark Adler
3 * For conditions of distribution and use, see copyright notice in zlib.h 3 * For conditions of distribution and use, see copyright notice in zlib.h
4 */ 4 */
5 5
@@ -9,7 +9,7 @@
9#define MAXBITS 15 9#define MAXBITS 15
10 10
11const char inflate_copyright[] = 11const char inflate_copyright[] =
12 " inflate 1.2.1 Copyright 1995-2003 Mark Adler "; 12 " inflate 1.2.1.1 Copyright 1995-2004 Mark Adler ";
13/* 13/*
14 If you use the zlib library in a product, an acknowledgment is welcome 14 If you use the zlib library in a product, an acknowledgment is welcome
15 in the documentation of your product. If for some reason you cannot 15 in the documentation of your product. If for some reason you cannot
@@ -62,7 +62,7 @@ unsigned short FAR *work;
62 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; 62 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
63 static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 63 static const unsigned short lext[31] = { /* Length codes 257..285 extra */
64 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 64 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
65 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 76, 66}; 65 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 202, 196};
66 static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 66 static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
67 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 67 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
68 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 68 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
@@ -114,7 +114,15 @@ unsigned short FAR *work;
114 for (max = MAXBITS; max >= 1; max--) 114 for (max = MAXBITS; max >= 1; max--)
115 if (count[max] != 0) break; 115 if (count[max] != 0) break;
116 if (root > max) root = max; 116 if (root > max) root = max;
117 if (max == 0) return -1; /* no codes! */ 117 if (max == 0) { /* no symbols to code at all */
118 this.op = (unsigned char)64; /* invalid code marker */
119 this.bits = (unsigned char)1;
120 this.val = (unsigned short)0;
121 *(*table)++ = this; /* make a table to force an error */
122 *(*table)++ = this;
123 *bits = 1;
124 return 0; /* no symbols, but wait for decoding to report error */
125 }
118 for (min = 1; min <= MAXBITS; min++) 126 for (min = 1; min <= MAXBITS; min++)
119 if (count[min] != 0) break; 127 if (count[min] != 0) break;
120 if (root < min) root = min; 128 if (root < min) root = min;
diff --git a/qnx/package.qpg b/qnx/package.qpg
index 2b7d951..71f4462 100644
--- a/qnx/package.qpg
+++ b/qnx/package.qpg
@@ -25,10 +25,10 @@
25 <QPG:Files> 25 <QPG:Files>
26 <QPG:Add file="../zconf.h" install="/opt/include/" user="root:sys" permission="644"/> 26 <QPG:Add file="../zconf.h" install="/opt/include/" user="root:sys" permission="644"/>
27 <QPG:Add file="../zlib.h" install="/opt/include/" user="root:sys" permission="644"/> 27 <QPG:Add file="../zlib.h" install="/opt/include/" user="root:sys" permission="644"/>
28 <QPG:Add file="../libz.so.1.2.1" install="/opt/lib/" user="root:bin" permission="644"/> 28 <QPG:Add file="../libz.so.1.2.1.1" install="/opt/lib/" user="root:bin" permission="644"/>
29 <QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.1"/> 29 <QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.1.1"/>
30 <QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.1"/> 30 <QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.1.1"/>
31 <QPG:Add file="../libz.so.1.2.1" install="/opt/lib/" component="slib"/> 31 <QPG:Add file="../libz.so.1.2.1.1" install="/opt/lib/" component="slib"/>
32 </QPG:Files> 32 </QPG:Files>
33 33
34 <QPG:PackageFilter> 34 <QPG:PackageFilter>
@@ -63,7 +63,7 @@
63 </QPM:ProductDescription> 63 </QPM:ProductDescription>
64 64
65 <QPM:ReleaseDescription> 65 <QPM:ReleaseDescription>
66 <QPM:ReleaseVersion>1.2.1</QPM:ReleaseVersion> 66 <QPM:ReleaseVersion>1.2.1.1</QPM:ReleaseVersion>
67 <QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency> 67 <QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency>
68 <QPM:ReleaseStability>Stable</QPM:ReleaseStability> 68 <QPM:ReleaseStability>Stable</QPM:ReleaseStability>
69 <QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor> 69 <QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor>
diff --git a/win32/zlib1.rc b/win32/zlib1.rc
index 326375d..19fdc99 100644
--- a/win32/zlib1.rc
+++ b/win32/zlib1.rc
@@ -5,8 +5,8 @@ VS_VERSION_INFO VERSIONINFO
5#else 5#else
6VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 6VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
7#endif 7#endif
8 FILEVERSION 1,2,1,0 8 FILEVERSION 1,2,1,1
9 PRODUCTVERSION 1,2,1,0 9 PRODUCTVERSION 1,2,1,1
10 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 10 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
11#ifdef _DEBUG 11#ifdef _DEBUG
12 FILEFLAGS 1 12 FILEFLAGS 1
@@ -23,12 +23,12 @@ BEGIN
23 //language ID = U.S. English, char set = Windows, Multilingual 23 //language ID = U.S. English, char set = Windows, Multilingual
24 BEGIN 24 BEGIN
25 VALUE "FileDescription", "zlib data compression library\0" 25 VALUE "FileDescription", "zlib data compression library\0"
26 VALUE "FileVersion", "1.2.1\0" 26 VALUE "FileVersion", "1.2.1.1\0"
27 VALUE "InternalName", "zlib1.dll\0" 27 VALUE "InternalName", "zlib1.dll\0"
28 VALUE "LegalCopyright", "(C) 1995-2003 Jean-loup Gailly & Mark Adler\0" 28 VALUE "LegalCopyright", "(C) 1995-2003 Jean-loup Gailly & Mark Adler\0"
29 VALUE "OriginalFilename", "zlib1.dll\0" 29 VALUE "OriginalFilename", "zlib1.dll\0"
30 VALUE "ProductName", "zlib\0" 30 VALUE "ProductName", "zlib\0"
31 VALUE "ProductVersion", "1.2.1\0" 31 VALUE "ProductVersion", "1.2.1.1\0"
32 VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 32 VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
33 END 33 END
34 END 34 END
diff --git a/zlib.3 b/zlib.3
index 8900984..a9754f9 100644
--- a/zlib.3
+++ b/zlib.3
@@ -1,4 +1,4 @@
1.TH ZLIB 3 "17 November 2003" 1.TH ZLIB 3 "9 January 2004"
2.SH NAME 2.SH NAME
3zlib \- compression/decompression library 3zlib \- compression/decompression library
4.SH SYNOPSIS 4.SH SYNOPSIS
@@ -133,8 +133,8 @@ before asking for help.
133Send questions and/or comments to zlib@gzip.org, 133Send questions and/or comments to zlib@gzip.org,
134or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). 134or (for the Windows DLL version) to Gilles Vollant (info@winimage.com).
135.SH AUTHORS 135.SH AUTHORS
136Version 1.2.1 136Version 1.2.1.1
137Copyright (C) 1995-2003 Jean-loup Gailly (jloup@gzip.org) 137Copyright (C) 1995-2004 Jean-loup Gailly (jloup@gzip.org)
138and Mark Adler (madler@alumni.caltech.edu). 138and Mark Adler (madler@alumni.caltech.edu).
139.LP 139.LP
140This software is provided "as-is," 140This software is provided "as-is,"
diff --git a/zlib.h b/zlib.h
index 92edf96..c97f682 100644
--- a/zlib.h
+++ b/zlib.h
@@ -1,7 +1,7 @@
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.2.1, November 17th, 2003 2 version 1.2.1.1, January 9th, 2004
3 3
4 Copyright (C) 1995-2003 Jean-loup Gailly and Mark Adler 4 Copyright (C) 1995-2004 Jean-loup Gailly and Mark Adler
5 5
6 This software is provided 'as-is', without any express or implied 6 This software is provided 'as-is', without any express or implied
7 warranty. In no event will the authors be held liable for any damages 7 warranty. In no event will the authors be held liable for any damages
@@ -37,8 +37,8 @@
37extern "C" { 37extern "C" {
38#endif 38#endif
39 39
40#define ZLIB_VERSION "1.2.1" 40#define ZLIB_VERSION "1.2.1.1"
41#define ZLIB_VERNUM 0x1210 41#define ZLIB_VERNUM 0x1211
42 42
43/* 43/*
44 The 'zlib' compression library provides in-memory compression and 44 The 'zlib' compression library provides in-memory compression and