aboutsummaryrefslogtreecommitdiff
path: root/FAQ
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:24:33 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:24:33 -0700
commit0484693e1723bbab791c56f95597bd7dbe867d03 (patch)
tree8f31dbed98b4390da74a90b484f2accf8f8a3a8e /FAQ
parent9811b53dd9e8f67015c7199fff12b5bfc6965330 (diff)
downloadzlib-0484693e1723bbab791c56f95597bd7dbe867d03.tar.gz
zlib-0484693e1723bbab791c56f95597bd7dbe867d03.tar.bz2
zlib-0484693e1723bbab791c56f95597bd7dbe867d03.zip
zlib 1.2.2.2v1.2.2.2
Diffstat (limited to 'FAQ')
-rw-r--r--FAQ26
1 files changed, 14 insertions, 12 deletions
diff --git a/FAQ b/FAQ
index 4f61f10..441d910 100644
--- a/FAQ
+++ b/FAQ
@@ -148,13 +148,6 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
148 format using deflateInit2(). You can also request that inflate decode 148 format using deflateInit2(). You can also request that inflate decode
149 the gzip format using inflateInit2(). Read zlib.h for more details. 149 the gzip format using inflateInit2(). Read zlib.h for more details.
150 150
151 Note that you cannot specify special gzip header contents (e.g. a file
152 name or modification date), nor will inflate tell you what was in the
153 gzip header. If you need to customize the header or see what's in it,
154 you can use the raw deflate and inflate operations and the crc32()
155 function and roll your own gzip encoding and decoding. Read the gzip
156 RFC 1952 for details of the header and trailer format.
157
15821. Is zlib thread-safe? 15121. Is zlib thread-safe?
159 152
160 Yes. However any library routines that zlib uses and any application- 153 Yes. However any library routines that zlib uses and any application-
@@ -295,20 +288,29 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
295 were downright silly. So now, we simply make sure that the code always 288 were downright silly. So now, we simply make sure that the code always
296 works. 289 works.
297 290
29836. Will zlib read the (insert any ancient or arcane format here) compressed 29136. Valgrind (or some similar memory access checker) says that deflate is
292 performing a conditional jump that depends on an uninitialized value.
293 Isn't that a bug?
294
295 No. That is intentional for performance reasons, and the output of
296 deflate is not affected. This only started showing up recently since
297 zlib 1.2.x uses malloc() by default for allocations, whereas earlier
298 versions used calloc(), which zeros out the allocated memory.
299
30037. Will zlib read the (insert any ancient or arcane format here) compressed
299 data format? 301 data format?
300 302
301 Probably not. Look in the comp.compression FAQ for pointers to various 303 Probably not. Look in the comp.compression FAQ for pointers to various
302 formats and associated software. 304 formats and associated software.
303 305
30437. How can I encrypt/decrypt zip files with zlib? 30638. How can I encrypt/decrypt zip files with zlib?
305 307
306 zlib doesn't support encryption. The original PKZIP encryption is very weak 308 zlib doesn't support encryption. The original PKZIP encryption is very weak
307 and can be broken with freely available programs. To get strong encryption, 309 and can be broken with freely available programs. To get strong encryption,
308 use GnuPG, http://www.gnupg.org/ , which already includes zlib compression. 310 use GnuPG, http://www.gnupg.org/ , which already includes zlib compression.
309 For PKZIP compatible "encryption", look at http://www.info-zip.org/ 311 For PKZIP compatible "encryption", look at http://www.info-zip.org/
310 312
31138. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings? 31339. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
312 314
313 "gzip" is the gzip format, and "deflate" is the zlib format. They should 315 "gzip" is the gzip format, and "deflate" is the zlib format. They should
314 probably have called the second one "zlib" instead to avoid confusion 316 probably have called the second one "zlib" instead to avoid confusion
@@ -324,14 +326,14 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
324 326
325 Bottom line: use the gzip format for HTTP 1.1 encoding. 327 Bottom line: use the gzip format for HTTP 1.1 encoding.
326 328
32739. Does zlib support the new "Deflate64" format introduced by PKWare? 32940. Does zlib support the new "Deflate64" format introduced by PKWare?
328 330
329 No. PKWare has apparently decided to keep that format proprietary, since 331 No. PKWare has apparently decided to keep that format proprietary, since
330 they have not documented it as they have previous compression formats. 332 they have not documented it as they have previous compression formats.
331 In any case, the compression improvements are so modest compared to other 333 In any case, the compression improvements are so modest compared to other
332 more modern approaches, that it's not worth the effort to implement. 334 more modern approaches, that it's not worth the effort to implement.
333 335
33440. Can you please sign these lengthy legal documents and fax them back to us 33641. Can you please sign these lengthy legal documents and fax them back to us
335 so that we can use your software in our product? 337 so that we can use your software in our product?
336 338
337 No. Go away. Shoo. 339 No. Go away. Shoo.