199767f8919635c4928607450d9e0abb932109ceToomas Soome Frequently Asked Questions about zlib
199767f8919635c4928607450d9e0abb932109ceToomas SoomeIf your question is not there, please check the zlib home page
199767f8919635c4928607450d9e0abb932109ceToomas Soomehttp://zlib.net/ which may have more recent information.
199767f8919635c4928607450d9e0abb932109ceToomas SoomeThe lastest zlib FAQ is at http://zlib.net/zlib_faq.html
199767f8919635c4928607450d9e0abb932109ceToomas Soome 1. Is zlib Y2K-compliant?
199767f8919635c4928607450d9e0abb932109ceToomas Soome Yes. zlib doesn't handle dates.
199767f8919635c4928607450d9e0abb932109ceToomas Soome 2. Where can I get a Windows DLL version?
199767f8919635c4928607450d9e0abb932109ceToomas Soome The zlib sources can be compiled without change to produce a DLL. See the
199767f8919635c4928607450d9e0abb932109ceToomas Soome file win32/DLL_FAQ.txt in the zlib distribution. Pointers to the
199767f8919635c4928607450d9e0abb932109ceToomas Soome precompiled DLL are found in the zlib web site at http://zlib.net/ .
199767f8919635c4928607450d9e0abb932109ceToomas Soome 3. Where can I get a Visual Basic interface to zlib?
199767f8919635c4928607450d9e0abb932109ceToomas Soome * win32/DLL_FAQ.txt in the zlib distribution
199767f8919635c4928607450d9e0abb932109ceToomas Soome 4. compress() returns Z_BUF_ERROR.
199767f8919635c4928607450d9e0abb932109ceToomas Soome Make sure that before the call of compress(), the length of the compressed
199767f8919635c4928607450d9e0abb932109ceToomas Soome buffer is equal to the available size of the compressed buffer and not
199767f8919635c4928607450d9e0abb932109ceToomas Soome zero. For Visual Basic, check that this parameter is passed by reference
199767f8919635c4928607450d9e0abb932109ceToomas Soome ("as any"), not by value ("as long").
199767f8919635c4928607450d9e0abb932109ceToomas Soome 5. deflate() or inflate() returns Z_BUF_ERROR.
199767f8919635c4928607450d9e0abb932109ceToomas Soome Before making the call, make sure that avail_in and avail_out are not zero.
199767f8919635c4928607450d9e0abb932109ceToomas Soome When setting the parameter flush equal to Z_FINISH, also make sure that
199767f8919635c4928607450d9e0abb932109ceToomas Soome avail_out is big enough to allow processing all pending input. Note that a
199767f8919635c4928607450d9e0abb932109ceToomas Soome Z_BUF_ERROR is not fatal--another call to deflate() or inflate() can be
199767f8919635c4928607450d9e0abb932109ceToomas Soome made with more input or output space. A Z_BUF_ERROR may in fact be
199767f8919635c4928607450d9e0abb932109ceToomas Soome unavoidable depending on how the functions are used, since it is not
199767f8919635c4928607450d9e0abb932109ceToomas Soome possible to tell whether or not there is more output pending when
199767f8919635c4928607450d9e0abb932109ceToomas Soome strm.avail_out returns with zero. See http://zlib.net/zlib_how.html for a
199767f8919635c4928607450d9e0abb932109ceToomas Soome heavily annotated example.
199767f8919635c4928607450d9e0abb932109ceToomas Soome 6. Where's the zlib documentation (man pages, etc.)?
199767f8919635c4928607450d9e0abb932109ceToomas Soome It's in zlib.h . Examples of zlib usage are in the files test/example.c
199767f8919635c4928607450d9e0abb932109ceToomas Soome and test/minigzip.c, with more in examples/ .
199767f8919635c4928607450d9e0abb932109ceToomas Soome 7. Why don't you use GNU autoconf or libtool or ...?
199767f8919635c4928607450d9e0abb932109ceToomas Soome Because we would like to keep zlib as a very small and simple package.
199767f8919635c4928607450d9e0abb932109ceToomas Soome zlib is rather portable and doesn't need much configuration.
199767f8919635c4928607450d9e0abb932109ceToomas Soome 8. I found a bug in zlib.
199767f8919635c4928607450d9e0abb932109ceToomas Soome Most of the time, such problems are due to an incorrect usage of zlib.
199767f8919635c4928607450d9e0abb932109ceToomas Soome Please try to reproduce the problem with a small program and send the
199767f8919635c4928607450d9e0abb932109ceToomas Soome corresponding source to us at zlib@gzip.org . Do not send multi-megabyte
199767f8919635c4928607450d9e0abb932109ceToomas Soome data files without prior agreement.
199767f8919635c4928607450d9e0abb932109ceToomas Soome 9. Why do I get "undefined reference to gzputc"?
199767f8919635c4928607450d9e0abb932109ceToomas Soome If "make test" produces something like
199767f8919635c4928607450d9e0abb932109ceToomas Soome example.o(.text+0x154): undefined reference to `gzputc'
199767f8919635c4928607450d9e0abb932109ceToomas Soome check that you don't have old files libz.* in /usr/lib, /usr/local/lib or
199767f8919635c4928607450d9e0abb932109ceToomas Soome /usr/X11R6/lib. Remove any old versions, then do "make install".
199767f8919635c4928607450d9e0abb932109ceToomas Soome10. I need a Delphi interface to zlib.
199767f8919635c4928607450d9e0abb932109ceToomas Soome See the contrib/delphi directory in the zlib distribution.
199767f8919635c4928607450d9e0abb932109ceToomas Soome11. Can zlib handle .zip archives?
199767f8919635c4928607450d9e0abb932109ceToomas Soome Not by itself, no. See the directory contrib/minizip in the zlib
199767f8919635c4928607450d9e0abb932109ceToomas Soome distribution.
199767f8919635c4928607450d9e0abb932109ceToomas Soome12. Can zlib handle .Z files?
199767f8919635c4928607450d9e0abb932109ceToomas Soome No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt
199767f8919635c4928607450d9e0abb932109ceToomas Soome the code of uncompress on your own.
199767f8919635c4928607450d9e0abb932109ceToomas Soome13. How can I make a Unix shared library?
199767f8919635c4928607450d9e0abb932109ceToomas Soome By default a shared (and a static) library is built for Unix. So:
199767f8919635c4928607450d9e0abb932109ceToomas Soome make distclean
199767f8919635c4928607450d9e0abb932109ceToomas Soome14. How do I install a shared zlib library on Unix?
199767f8919635c4928607450d9e0abb932109ceToomas Soome After the above, then:
199767f8919635c4928607450d9e0abb932109ceToomas Soome make install
199767f8919635c4928607450d9e0abb932109ceToomas Soome However, many flavors of Unix come with a shared zlib already installed.
199767f8919635c4928607450d9e0abb932109ceToomas Soome Before going to the trouble of compiling a shared version of zlib and
199767f8919635c4928607450d9e0abb932109ceToomas Soome trying to install it, you may want to check if it's already there! If you
199767f8919635c4928607450d9e0abb932109ceToomas Soome can #include <zlib.h>, it's there. The -lz option will probably link to
199767f8919635c4928607450d9e0abb932109ceToomas Soome it. You can check the version at the top of zlib.h or with the
199767f8919635c4928607450d9e0abb932109ceToomas Soome ZLIB_VERSION symbol defined in zlib.h .
199767f8919635c4928607450d9e0abb932109ceToomas Soome15. I have a question about OttoPDF.
199767f8919635c4928607450d9e0abb932109ceToomas Soome We are not the authors of OttoPDF. The real author is on the OttoPDF web
199767f8919635c4928607450d9e0abb932109ceToomas Soome site: Joel Hainley, jhainley@myndkryme.com.
199767f8919635c4928607450d9e0abb932109ceToomas Soome16. Can zlib decode Flate data in an Adobe PDF file?
199767f8919635c4928607450d9e0abb932109ceToomas Soome Yes. See http://www.pdflib.com/ . To modify PDF forms, see
199767f8919635c4928607450d9e0abb932109ceToomas Soome http://sourceforge.net/projects/acroformtool/ .
199767f8919635c4928607450d9e0abb932109ceToomas Soome17. Why am I getting this "register_frame_info not found" error on Solaris?
199767f8919635c4928607450d9e0abb932109ceToomas Soome After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib
199767f8919635c4928607450d9e0abb932109ceToomas Soome generates an error such as:
199767f8919635c4928607450d9e0abb932109ceToomas Soome ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so:
199767f8919635c4928607450d9e0abb932109ceToomas Soome symbol __register_frame_info: referenced symbol not found
199767f8919635c4928607450d9e0abb932109ceToomas Soome The symbol __register_frame_info is not part of zlib, it is generated by
199767f8919635c4928607450d9e0abb932109ceToomas Soome the C compiler (cc or gcc). You must recompile applications using zlib
199767f8919635c4928607450d9e0abb932109ceToomas Soome which have this problem. This problem is specific to Solaris. See
199767f8919635c4928607450d9e0abb932109ceToomas Soome http://www.sunfreeware.com for Solaris versions of zlib and applications
199767f8919635c4928607450d9e0abb932109ceToomas Soome18. Why does gzip give an error on a file I make with compress/deflate?
199767f8919635c4928607450d9e0abb932109ceToomas Soome The compress and deflate functions produce data in the zlib format, which
199767f8919635c4928607450d9e0abb932109ceToomas Soome is different and incompatible with the gzip format. The gz* functions in
199767f8919635c4928607450d9e0abb932109ceToomas Soome zlib on the other hand use the gzip format. Both the zlib and gzip formats
199767f8919635c4928607450d9e0abb932109ceToomas Soome use the same compressed data format internally, but have different headers
199767f8919635c4928607450d9e0abb932109ceToomas Soome and trailers around the compressed data.
199767f8919635c4928607450d9e0abb932109ceToomas Soome19. Ok, so why are there two different formats?
199767f8919635c4928607450d9e0abb932109ceToomas Soome The gzip format was designed to retain the directory information about a
199767f8919635c4928607450d9e0abb932109ceToomas Soome single file, such as the name and last modification date. The zlib format
199767f8919635c4928607450d9e0abb932109ceToomas Soome on the other hand was designed for in-memory and communication channel
199767f8919635c4928607450d9e0abb932109ceToomas Soome applications, and has a much more compact header and trailer and uses a
199767f8919635c4928607450d9e0abb932109ceToomas Soome faster integrity check than gzip.
199767f8919635c4928607450d9e0abb932109ceToomas Soome20. Well that's nice, but how do I make a gzip file in memory?
199767f8919635c4928607450d9e0abb932109ceToomas Soome You can request that deflate write the gzip format instead of the zlib
199767f8919635c4928607450d9e0abb932109ceToomas Soome format using deflateInit2(). You can also request that inflate decode the
199767f8919635c4928607450d9e0abb932109ceToomas Soome gzip format using inflateInit2(). Read zlib.h for more details.
199767f8919635c4928607450d9e0abb932109ceToomas Soome21. Is zlib thread-safe?
199767f8919635c4928607450d9e0abb932109ceToomas Soome Yes. However any library routines that zlib uses and any application-
199767f8919635c4928607450d9e0abb932109ceToomas Soome provided memory allocation routines must also be thread-safe. zlib's gz*
199767f8919635c4928607450d9e0abb932109ceToomas Soome functions use stdio library routines, and most of zlib's functions use the
199767f8919635c4928607450d9e0abb932109ceToomas Soome library memory allocation routines by default. zlib's *Init* functions
199767f8919635c4928607450d9e0abb932109ceToomas Soome allow for the application to provide custom memory allocation routines.
199767f8919635c4928607450d9e0abb932109ceToomas Soome Of course, you should only operate on any given zlib or gzip stream from a
199767f8919635c4928607450d9e0abb932109ceToomas Soome single thread at a time.
199767f8919635c4928607450d9e0abb932109ceToomas Soome22. Can I use zlib in my commercial application?
199767f8919635c4928607450d9e0abb932109ceToomas Soome Yes. Please read the license in zlib.h.
199767f8919635c4928607450d9e0abb932109ceToomas Soome23. Is zlib under the GNU license?
199767f8919635c4928607450d9e0abb932109ceToomas Soome No. Please read the license in zlib.h.
199767f8919635c4928607450d9e0abb932109ceToomas Soome24. The license says that altered source versions must be "plainly marked". So
199767f8919635c4928607450d9e0abb932109ceToomas Soome what exactly do I need to do to meet that requirement?
199767f8919635c4928607450d9e0abb932109ceToomas Soome You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In
199767f8919635c4928607450d9e0abb932109ceToomas Soome particular, the final version number needs to be changed to "f", and an
199767f8919635c4928607450d9e0abb932109ceToomas Soome identification string should be appended to ZLIB_VERSION. Version numbers
199767f8919635c4928607450d9e0abb932109ceToomas Soome x.x.x.f are reserved for modifications to zlib by others than the zlib
199767f8919635c4928607450d9e0abb932109ceToomas Soome maintainers. For example, if the version of the base zlib you are altering
199767f8919635c4928607450d9e0abb932109ceToomas Soome is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and
199767f8919635c4928607450d9e0abb932109ceToomas Soome ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also
199767f8919635c4928607450d9e0abb932109ceToomas Soome update the version strings in deflate.c and inftrees.c.
199767f8919635c4928607450d9e0abb932109ceToomas Soome For altered source distributions, you should also note the origin and
199767f8919635c4928607450d9e0abb932109ceToomas Soome nature of the changes in zlib.h, as well as in ChangeLog and README, along
199767f8919635c4928607450d9e0abb932109ceToomas Soome with the dates of the alterations. The origin should include at least your
199767f8919635c4928607450d9e0abb932109ceToomas Soome name (or your company's name), and an email address to contact for help or
199767f8919635c4928607450d9e0abb932109ceToomas Soome issues with the library.
199767f8919635c4928607450d9e0abb932109ceToomas Soome Note that distributing a compiled zlib library along with zlib.h and
199767f8919635c4928607450d9e0abb932109ceToomas Soome zconf.h is also a source distribution, and so you should change
199767f8919635c4928607450d9e0abb932109ceToomas Soome ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes
199767f8919635c4928607450d9e0abb932109ceToomas Soome in zlib.h as you would for a full source distribution.
199767f8919635c4928607450d9e0abb932109ceToomas Soome25. Will zlib work on a big-endian or little-endian architecture, and can I
199767f8919635c4928607450d9e0abb932109ceToomas Soome exchange compressed data between them?
199767f8919635c4928607450d9e0abb932109ceToomas Soome Yes and yes.
199767f8919635c4928607450d9e0abb932109ceToomas Soome26. Will zlib work on a 64-bit machine?
199767f8919635c4928607450d9e0abb932109ceToomas Soome Yes. It has been tested on 64-bit machines, and has no dependence on any
199767f8919635c4928607450d9e0abb932109ceToomas Soome data types being limited to 32-bits in length. If you have any
199767f8919635c4928607450d9e0abb932109ceToomas Soome difficulties, please provide a complete problem report to zlib@gzip.org
199767f8919635c4928607450d9e0abb932109ceToomas Soome27. Will zlib decompress data from the PKWare Data Compression Library?
199767f8919635c4928607450d9e0abb932109ceToomas Soome No. The PKWare DCL uses a completely different compressed data format than
199767f8919635c4928607450d9e0abb932109ceToomas Soome does PKZIP and zlib. However, you can look in zlib's contrib/blast
199767f8919635c4928607450d9e0abb932109ceToomas Soome directory for a possible solution to your problem.
199767f8919635c4928607450d9e0abb932109ceToomas Soome28. Can I access data randomly in a compressed stream?
199767f8919635c4928607450d9e0abb932109ceToomas Soome No, not without some preparation. If when compressing you periodically use
199767f8919635c4928607450d9e0abb932109ceToomas Soome Z_FULL_FLUSH, carefully write all the pending data at those points, and
199767f8919635c4928607450d9e0abb932109ceToomas Soome keep an index of those locations, then you can start decompression at those
199767f8919635c4928607450d9e0abb932109ceToomas Soome points. You have to be careful to not use Z_FULL_FLUSH too often, since it
199767f8919635c4928607450d9e0abb932109ceToomas Soome can significantly degrade compression. Alternatively, you can scan a
199767f8919635c4928607450d9e0abb932109ceToomas Soome deflate stream once to generate an index, and then use that index for
199767f8919635c4928607450d9e0abb932109ceToomas Soome random access. See examples/zran.c .
199767f8919635c4928607450d9e0abb932109ceToomas Soome29. Does zlib work on MVS, OS/390, CICS, etc.?
199767f8919635c4928607450d9e0abb932109ceToomas Soome It has in the past, but we have not heard of any recent evidence. There
199767f8919635c4928607450d9e0abb932109ceToomas Soome were working ports of zlib 1.1.4 to MVS, but those links no longer work.
199767f8919635c4928607450d9e0abb932109ceToomas Soome If you know of recent, successful applications of zlib on these operating
199767f8919635c4928607450d9e0abb932109ceToomas Soome systems, please let us know. Thanks.
199767f8919635c4928607450d9e0abb932109ceToomas Soome30. Is there some simpler, easier to read version of inflate I can look at to
199767f8919635c4928607450d9e0abb932109ceToomas Soome understand the deflate format?
199767f8919635c4928607450d9e0abb932109ceToomas Soome First off, you should read RFC 1951. Second, yes. Look in zlib's
199767f8919635c4928607450d9e0abb932109ceToomas Soome31. Does zlib infringe on any patents?
199767f8919635c4928607450d9e0abb932109ceToomas Soome As far as we know, no. In fact, that was originally the whole point behind
199767f8919635c4928607450d9e0abb932109ceToomas Soome zlib. Look here for some more information:
199767f8919635c4928607450d9e0abb932109ceToomas Soome32. Can zlib work with greater than 4 GB of data?
199767f8919635c4928607450d9e0abb932109ceToomas Soome Yes. inflate() and deflate() will process any amount of data correctly.
199767f8919635c4928607450d9e0abb932109ceToomas Soome Each call of inflate() or deflate() is limited to input and output chunks
199767f8919635c4928607450d9e0abb932109ceToomas Soome of the maximum value that can be stored in the compiler's "unsigned int"
199767f8919635c4928607450d9e0abb932109ceToomas Soome type, but there is no limit to the number of chunks. Note however that the
199767f8919635c4928607450d9e0abb932109ceToomas Soome strm.total_in and strm_total_out counters may be limited to 4 GB. These
199767f8919635c4928607450d9e0abb932109ceToomas Soome counters are provided as a convenience and are not used internally by
199767f8919635c4928607450d9e0abb932109ceToomas Soome inflate() or deflate(). The application can easily set up its own counters
199767f8919635c4928607450d9e0abb932109ceToomas Soome updated after each call of inflate() or deflate() to count beyond 4 GB.
199767f8919635c4928607450d9e0abb932109ceToomas Soome compress() and uncompress() may be limited to 4 GB, since they operate in a
199767f8919635c4928607450d9e0abb932109ceToomas Soome single call. gzseek() and gztell() may be limited to 4 GB depending on how
199767f8919635c4928607450d9e0abb932109ceToomas Soome zlib is compiled. See the zlibCompileFlags() function in zlib.h.
199767f8919635c4928607450d9e0abb932109ceToomas Soome The word "may" appears several times above since there is a 4 GB limit only
199767f8919635c4928607450d9e0abb932109ceToomas Soome if the compiler's "long" type is 32 bits. If the compiler's "long" type is
199767f8919635c4928607450d9e0abb932109ceToomas Soome 64 bits, then the limit is 16 exabytes.
199767f8919635c4928607450d9e0abb932109ceToomas Soome33. Does zlib have any security vulnerabilities?
199767f8919635c4928607450d9e0abb932109ceToomas Soome The only one that we are aware of is potentially in gzprintf(). If zlib is
199767f8919635c4928607450d9e0abb932109ceToomas Soome compiled to use sprintf() or vsprintf(), then there is no protection
199767f8919635c4928607450d9e0abb932109ceToomas Soome against a buffer overflow of an 8K string space (or other value as set by
199767f8919635c4928607450d9e0abb932109ceToomas Soome gzbuffer()), other than the caller of gzprintf() assuring that the output
199767f8919635c4928607450d9e0abb932109ceToomas Soome will not exceed 8K. On the other hand, if zlib is compiled to use
199767f8919635c4928607450d9e0abb932109ceToomas Soome snprintf() or vsnprintf(), which should normally be the case, then there is
199767f8919635c4928607450d9e0abb932109ceToomas Soome no vulnerability. The ./configure script will display warnings if an
199767f8919635c4928607450d9e0abb932109ceToomas Soome insecure variation of sprintf() will be used by gzprintf(). Also the
199767f8919635c4928607450d9e0abb932109ceToomas Soome zlibCompileFlags() function will return information on what variant of
199767f8919635c4928607450d9e0abb932109ceToomas Soome sprintf() is used by gzprintf().
199767f8919635c4928607450d9e0abb932109ceToomas Soome If you don't have snprintf() or vsnprintf() and would like one, you can
199767f8919635c4928607450d9e0abb932109ceToomas Soome find a portable implementation here:
199767f8919635c4928607450d9e0abb932109ceToomas Soome Note that you should be using the most recent version of zlib. Versions
199767f8919635c4928607450d9e0abb932109ceToomas Soome 1.1.3 and before were subject to a double-free vulnerability, and versions
199767f8919635c4928607450d9e0abb932109ceToomas Soome 1.2.1 and 1.2.2 were subject to an access exception when decompressing
199767f8919635c4928607450d9e0abb932109ceToomas Soome invalid compressed data.
199767f8919635c4928607450d9e0abb932109ceToomas Soome34. Is there a Java version of zlib?
199767f8919635c4928607450d9e0abb932109ceToomas Soome Probably what you want is to use zlib in Java. zlib is already included
199767f8919635c4928607450d9e0abb932109ceToomas Soome as part of the Java SDK in the java.util.zip package. If you really want
199767f8919635c4928607450d9e0abb932109ceToomas Soome a version of zlib written in the Java language, look on the zlib home
199767f8919635c4928607450d9e0abb932109ceToomas Soome page for links: http://zlib.net/ .
199767f8919635c4928607450d9e0abb932109ceToomas Soome35. I get this or that compiler or source-code scanner warning when I crank it
199767f8919635c4928607450d9e0abb932109ceToomas Soome up to maximally-pedantic. Can't you guys write proper code?
199767f8919635c4928607450d9e0abb932109ceToomas Soome Many years ago, we gave up attempting to avoid warnings on every compiler
199767f8919635c4928607450d9e0abb932109ceToomas Soome in the universe. It just got to be a waste of time, and some compilers
199767f8919635c4928607450d9e0abb932109ceToomas Soome were downright silly as well as contradicted each other. So now, we simply
199767f8919635c4928607450d9e0abb932109ceToomas Soome make sure that the code always works.
199767f8919635c4928607450d9e0abb932109ceToomas Soome36. Valgrind (or some similar memory access checker) says that deflate is
199767f8919635c4928607450d9e0abb932109ceToomas Soome performing a conditional jump that depends on an uninitialized value.
199767f8919635c4928607450d9e0abb932109ceToomas Soome Isn't that a bug?
199767f8919635c4928607450d9e0abb932109ceToomas Soome No. That is intentional for performance reasons, and the output of deflate
199767f8919635c4928607450d9e0abb932109ceToomas Soome is not affected. This only started showing up recently since zlib 1.2.x
199767f8919635c4928607450d9e0abb932109ceToomas Soome uses malloc() by default for allocations, whereas earlier versions used
199767f8919635c4928607450d9e0abb932109ceToomas Soome calloc(), which zeros out the allocated memory. Even though the code was
199767f8919635c4928607450d9e0abb932109ceToomas Soome correct, versions 1.2.4 and later was changed to not stimulate these
199767f8919635c4928607450d9e0abb932109ceToomas Soome37. Will zlib read the (insert any ancient or arcane format here) compressed
199767f8919635c4928607450d9e0abb932109ceToomas Soome data format?
199767f8919635c4928607450d9e0abb932109ceToomas Soome Probably not. Look in the comp.compression FAQ for pointers to various
199767f8919635c4928607450d9e0abb932109ceToomas Soome formats and associated software.
199767f8919635c4928607450d9e0abb932109ceToomas Soome38. How can I encrypt/decrypt zip files with zlib?
199767f8919635c4928607450d9e0abb932109ceToomas Soome zlib doesn't support encryption. The original PKZIP encryption is very
199767f8919635c4928607450d9e0abb932109ceToomas Soome weak and can be broken with freely available programs. To get strong
199767f8919635c4928607450d9e0abb932109ceToomas Soome encryption, use GnuPG, http://www.gnupg.org/ , which already includes zlib
199767f8919635c4928607450d9e0abb932109ceToomas Soome compression. For PKZIP compatible "encryption", look at
199767f8919635c4928607450d9e0abb932109ceToomas Soome39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
199767f8919635c4928607450d9e0abb932109ceToomas Soome "gzip" is the gzip format, and "deflate" is the zlib format. They should
199767f8919635c4928607450d9e0abb932109ceToomas Soome probably have called the second one "zlib" instead to avoid confusion with
199767f8919635c4928607450d9e0abb932109ceToomas Soome the raw deflate compressed data format. While the HTTP 1.1 RFC 2616
199767f8919635c4928607450d9e0abb932109ceToomas Soome correctly points to the zlib specification in RFC 1950 for the "deflate"
199767f8919635c4928607450d9e0abb932109ceToomas Soome transfer encoding, there have been reports of servers and browsers that
199767f8919635c4928607450d9e0abb932109ceToomas Soome incorrectly produce or expect raw deflate data per the deflate
199767f8919635c4928607450d9e0abb932109ceToomas Soome specification in RFC 1951, most notably Microsoft. So even though the
199767f8919635c4928607450d9e0abb932109ceToomas Soome "deflate" transfer encoding using the zlib format would be the more
199767f8919635c4928607450d9e0abb932109ceToomas Soome efficient approach (and in fact exactly what the zlib format was designed
199767f8919635c4928607450d9e0abb932109ceToomas Soome for), using the "gzip" transfer encoding is probably more reliable due to
199767f8919635c4928607450d9e0abb932109ceToomas Soome an unfortunate choice of name on the part of the HTTP 1.1 authors.
199767f8919635c4928607450d9e0abb932109ceToomas Soome Bottom line: use the gzip format for HTTP 1.1 encoding.
199767f8919635c4928607450d9e0abb932109ceToomas Soome40. Does zlib support the new "Deflate64" format introduced by PKWare?
199767f8919635c4928607450d9e0abb932109ceToomas Soome No. PKWare has apparently decided to keep that format proprietary, since
199767f8919635c4928607450d9e0abb932109ceToomas Soome they have not documented it as they have previous compression formats. In
199767f8919635c4928607450d9e0abb932109ceToomas Soome any case, the compression improvements are so modest compared to other more
199767f8919635c4928607450d9e0abb932109ceToomas Soome modern approaches, that it's not worth the effort to implement.
199767f8919635c4928607450d9e0abb932109ceToomas Soome41. I'm having a problem with the zip functions in zlib, can you help?
199767f8919635c4928607450d9e0abb932109ceToomas Soome There are no zip functions in zlib. You are probably using minizip by
199767f8919635c4928607450d9e0abb932109ceToomas Soome Giles Vollant, which is found in the contrib directory of zlib. It is not
199767f8919635c4928607450d9e0abb932109ceToomas Soome part of zlib. In fact none of the stuff in contrib is part of zlib. The
199767f8919635c4928607450d9e0abb932109ceToomas Soome files in there are not supported by the zlib authors. You need to contact
199767f8919635c4928607450d9e0abb932109ceToomas Soome the authors of the respective contribution for help.
199767f8919635c4928607450d9e0abb932109ceToomas Soome42. The match.asm code in contrib is under the GNU General Public License.
199767f8919635c4928607450d9e0abb932109ceToomas Soome Since it's part of zlib, doesn't that mean that all of zlib falls under the
199767f8919635c4928607450d9e0abb932109ceToomas Soome No. The files in contrib are not part of zlib. They were contributed by
199767f8919635c4928607450d9e0abb932109ceToomas Soome other authors and are provided as a convenience to the user within the zlib
199767f8919635c4928607450d9e0abb932109ceToomas Soome distribution. Each item in contrib has its own license.
199767f8919635c4928607450d9e0abb932109ceToomas Soome43. Is zlib subject to export controls? What is its ECCN?
199767f8919635c4928607450d9e0abb932109ceToomas Soome zlib is not subject to export controls, and so is classified as EAR99.
199767f8919635c4928607450d9e0abb932109ceToomas Soome44. Can you please sign these lengthy legal documents and fax them back to us
199767f8919635c4928607450d9e0abb932109ceToomas Soome so that we can use your software in our product?
199767f8919635c4928607450d9e0abb932109ceToomas Soome No. Go away. Shoo.