This commit was generated by cvs2svn to compensate for changes in r35455,
which included commits to RCS files with non-trunk default branches. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
26
src/zlib/FAQ
26
src/zlib/FAQ
@@ -148,13 +148,6 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
|
|||||||
format using deflateInit2(). You can also request that inflate decode
|
format using deflateInit2(). You can also request that inflate decode
|
||||||
the gzip format using inflateInit2(). Read zlib.h for more details.
|
the gzip format using inflateInit2(). Read zlib.h for more details.
|
||||||
|
|
||||||
Note that you cannot specify special gzip header contents (e.g. a file
|
|
||||||
name or modification date), nor will inflate tell you what was in the
|
|
||||||
gzip header. If you need to customize the header or see what's in it,
|
|
||||||
you can use the raw deflate and inflate operations and the crc32()
|
|
||||||
function and roll your own gzip encoding and decoding. Read the gzip
|
|
||||||
RFC 1952 for details of the header and trailer format.
|
|
||||||
|
|
||||||
21. Is zlib thread-safe?
|
21. Is zlib thread-safe?
|
||||||
|
|
||||||
Yes. However any library routines that zlib uses and any application-
|
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
|
|||||||
were downright silly. So now, we simply make sure that the code always
|
were downright silly. So now, we simply make sure that the code always
|
||||||
works.
|
works.
|
||||||
|
|
||||||
36. Will zlib read the (insert any ancient or arcane format here) compressed
|
36. Valgrind (or some similar memory access checker) says that deflate is
|
||||||
|
performing a conditional jump that depends on an uninitialized value.
|
||||||
|
Isn't that a bug?
|
||||||
|
|
||||||
|
No. That is intentional for performance reasons, and the output of
|
||||||
|
deflate is not affected. This only started showing up recently since
|
||||||
|
zlib 1.2.x uses malloc() by default for allocations, whereas earlier
|
||||||
|
versions used calloc(), which zeros out the allocated memory.
|
||||||
|
|
||||||
|
37. Will zlib read the (insert any ancient or arcane format here) compressed
|
||||||
data format?
|
data format?
|
||||||
|
|
||||||
Probably not. Look in the comp.compression FAQ for pointers to various
|
Probably not. Look in the comp.compression FAQ for pointers to various
|
||||||
formats and associated software.
|
formats and associated software.
|
||||||
|
|
||||||
37. How can I encrypt/decrypt zip files with zlib?
|
38. How can I encrypt/decrypt zip files with zlib?
|
||||||
|
|
||||||
zlib doesn't support encryption. The original PKZIP encryption is very weak
|
zlib doesn't support encryption. The original PKZIP encryption is very weak
|
||||||
and can be broken with freely available programs. To get strong encryption,
|
and can be broken with freely available programs. To get strong encryption,
|
||||||
use GnuPG, http://www.gnupg.org/ , which already includes zlib compression.
|
use GnuPG, http://www.gnupg.org/ , which already includes zlib compression.
|
||||||
For PKZIP compatible "encryption", look at http://www.info-zip.org/
|
For PKZIP compatible "encryption", look at http://www.info-zip.org/
|
||||||
|
|
||||||
38. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
|
39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
|
||||||
|
|
||||||
"gzip" is the gzip format, and "deflate" is the zlib format. They should
|
"gzip" is the gzip format, and "deflate" is the zlib format. They should
|
||||||
probably have called the second one "zlib" instead to avoid confusion
|
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
|
|||||||
|
|
||||||
Bottom line: use the gzip format for HTTP 1.1 encoding.
|
Bottom line: use the gzip format for HTTP 1.1 encoding.
|
||||||
|
|
||||||
39. Does zlib support the new "Deflate64" format introduced by PKWare?
|
40. Does zlib support the new "Deflate64" format introduced by PKWare?
|
||||||
|
|
||||||
No. PKWare has apparently decided to keep that format proprietary, since
|
No. PKWare has apparently decided to keep that format proprietary, since
|
||||||
they have not documented it as they have previous compression formats.
|
they have not documented it as they have previous compression formats.
|
||||||
In any case, the compression improvements are so modest compared to other
|
In any case, the compression improvements are so modest compared to other
|
||||||
more modern approaches, that it's not worth the effort to implement.
|
more modern approaches, that it's not worth the effort to implement.
|
||||||
|
|
||||||
40. Can you please sign these lengthy legal documents and fax them back to us
|
41. Can you please sign these lengthy legal documents and fax them back to us
|
||||||
so that we can use your software in our product?
|
so that we can use your software in our product?
|
||||||
|
|
||||||
No. Go away. Shoo.
|
No. Go away. Shoo.
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
ZLIB DATA COMPRESSION LIBRARY
|
ZLIB DATA COMPRESSION LIBRARY
|
||||||
|
|
||||||
zlib 1.2.2 is a general purpose data compression library. All the code is
|
zlib 1.2.3 is a general purpose data compression library. All the code is
|
||||||
thread safe. The data format used by the zlib library is described by RFCs
|
thread safe. The data format used by the zlib library is described by RFCs
|
||||||
(Request for Comments) 1950 to 1952 in the files
|
(Request for Comments) 1950 to 1952 in the files
|
||||||
http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
|
http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
|
||||||
@@ -16,9 +16,8 @@ minigzip.c.
|
|||||||
|
|
||||||
To compile all files and run the test program, follow the instructions given at
|
To compile all files and run the test program, follow the instructions given at
|
||||||
the top of Makefile. In short "make test; make install" should work for most
|
the top of Makefile. In short "make test; make install" should work for most
|
||||||
machines. For Unix: "./configure; make test; make install" For MSDOS, use one
|
machines. For Unix: "./configure; make test; make install". For MSDOS, use one
|
||||||
of the special makefiles such as Makefile.msc. For VMS, use Make_vms.com or
|
of the special makefiles such as Makefile.msc. For VMS, use make_vms.com.
|
||||||
descrip.mms.
|
|
||||||
|
|
||||||
Questions about zlib should be sent to <zlib@gzip.org>, or to Gilles Vollant
|
Questions about zlib should be sent to <zlib@gzip.org>, or to Gilles Vollant
|
||||||
<info@winimage.com> for the Windows DLL version. The zlib home page is
|
<info@winimage.com> for the Windows DLL version. The zlib home page is
|
||||||
@@ -34,7 +33,7 @@ Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
|
|||||||
issue of Dr. Dobb's Journal; a copy of the article is available in
|
issue of Dr. Dobb's Journal; a copy of the article is available in
|
||||||
http://dogma.net/markn/articles/zlibtool/zlibtool.htm
|
http://dogma.net/markn/articles/zlibtool/zlibtool.htm
|
||||||
|
|
||||||
The changes made in version 1.2.2 are documented in the file ChangeLog.
|
The changes made in version 1.2.3 are documented in the file ChangeLog.
|
||||||
|
|
||||||
Unsupported third party contributions are provided in directory "contrib".
|
Unsupported third party contributions are provided in directory "contrib".
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/* inflate.h -- internal inflate state definition
|
/* inflate.h -- internal inflate state definition
|
||||||
* Copyright (C) 1995-2003 Mark Adler
|
* Copyright (C) 1995-2004 Mark Adler
|
||||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -19,7 +19,6 @@
|
|||||||
/* Possible inflate modes between inflate() calls */
|
/* Possible inflate modes between inflate() calls */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
HEAD, /* i: waiting for magic header */
|
HEAD, /* i: waiting for magic header */
|
||||||
#ifdef GUNZIP
|
|
||||||
FLAGS, /* i: waiting for method and flags (gzip) */
|
FLAGS, /* i: waiting for method and flags (gzip) */
|
||||||
TIME, /* i: waiting for modification time (gzip) */
|
TIME, /* i: waiting for modification time (gzip) */
|
||||||
OS, /* i: waiting for extra flags and operating system (gzip) */
|
OS, /* i: waiting for extra flags and operating system (gzip) */
|
||||||
@@ -28,7 +27,6 @@ typedef enum {
|
|||||||
NAME, /* i: waiting for end of file name (gzip) */
|
NAME, /* i: waiting for end of file name (gzip) */
|
||||||
COMMENT, /* i: waiting for end of comment (gzip) */
|
COMMENT, /* i: waiting for end of comment (gzip) */
|
||||||
HCRC, /* i: waiting for header crc (gzip) */
|
HCRC, /* i: waiting for header crc (gzip) */
|
||||||
#endif
|
|
||||||
DICTID, /* i: waiting for dictionary check value */
|
DICTID, /* i: waiting for dictionary check value */
|
||||||
DICT, /* waiting for inflateSetDictionary() call */
|
DICT, /* waiting for inflateSetDictionary() call */
|
||||||
TYPE, /* i: waiting for type bits, including last-flag bit */
|
TYPE, /* i: waiting for type bits, including last-flag bit */
|
||||||
@@ -45,9 +43,7 @@ typedef enum {
|
|||||||
MATCH, /* o: waiting for output space to copy string */
|
MATCH, /* o: waiting for output space to copy string */
|
||||||
LIT, /* o: waiting for output space to write literal */
|
LIT, /* o: waiting for output space to write literal */
|
||||||
CHECK, /* i: waiting for 32-bit check value */
|
CHECK, /* i: waiting for 32-bit check value */
|
||||||
#ifdef GUNZIP
|
|
||||||
LENGTH, /* i: waiting for 32-bit length (gzip) */
|
LENGTH, /* i: waiting for 32-bit length (gzip) */
|
||||||
#endif
|
|
||||||
DONE, /* finished check, done -- remain here until reset */
|
DONE, /* finished check, done -- remain here until reset */
|
||||||
BAD, /* got a data error -- remain here until reset */
|
BAD, /* got a data error -- remain here until reset */
|
||||||
MEM, /* got an inflate() memory error -- remain here until reset */
|
MEM, /* got an inflate() memory error -- remain here until reset */
|
||||||
@@ -84,8 +80,10 @@ struct inflate_state {
|
|||||||
int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
|
int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
|
||||||
int havedict; /* true if dictionary provided */
|
int havedict; /* true if dictionary provided */
|
||||||
int flags; /* gzip header method and flags (0 if zlib) */
|
int flags; /* gzip header method and flags (0 if zlib) */
|
||||||
|
unsigned dmax; /* zlib header max distance (INFLATE_STRICT) */
|
||||||
unsigned long check; /* protected copy of check value */
|
unsigned long check; /* protected copy of check value */
|
||||||
unsigned long total; /* protected copy of output count */
|
unsigned long total; /* protected copy of output count */
|
||||||
|
gz_headerp head; /* where to save gzip header information */
|
||||||
/* sliding window */
|
/* sliding window */
|
||||||
unsigned wbits; /* log base 2 of requested window size */
|
unsigned wbits; /* log base 2 of requested window size */
|
||||||
unsigned wsize; /* window size or zero if not using window */
|
unsigned wsize; /* window size or zero if not using window */
|
||||||
|
Reference in New Issue
Block a user