xref: /src/sys/contrib/zlib/FAQ (revision 7aa1dba6b00ccfb7d66627badc8a7aaa06b02946)
1628b9c34SPeter Wemm
2628b9c34SPeter Wemm                Frequently Asked Questions about zlib
3628b9c34SPeter Wemm
4628b9c34SPeter Wemm
5628b9c34SPeter WemmIf your question is not there, please check the zlib home page
6280d433dSXin LIhttps://zlib.net/ which may have more recent information.
7280d433dSXin LIThe latest zlib FAQ is at https://zlib.net/zlib_faq.html
8628b9c34SPeter Wemm
9628b9c34SPeter Wemm
10cdbc2952SBrian Feldman 1. Is zlib Y2K-compliant?
11628b9c34SPeter Wemm
12cdbc2952SBrian Feldman    Yes. zlib doesn't handle dates.
13628b9c34SPeter Wemm
14cdbc2952SBrian Feldman 2. Where can I get a Windows DLL version?
15628b9c34SPeter Wemm
16c7be98c2SXin LI    The zlib sources can be compiled without change to produce a DLL.  See the
17f4695a30SXin LI    file win32/DLL_FAQ.txt in the zlib distribution.
18628b9c34SPeter Wemm
19cdbc2952SBrian Feldman 3. Where can I get a Visual Basic interface to zlib?
20628b9c34SPeter Wemm
21cdbc2952SBrian Feldman    See
22280d433dSXin LI        * https://zlib.net/nelson/
2361933f06STim Kientzle        * win32/DLL_FAQ.txt in the zlib distribution
24628b9c34SPeter Wemm
2561933f06STim Kientzle 4. compress() returns Z_BUF_ERROR.
26628b9c34SPeter Wemm
27c7be98c2SXin LI    Make sure that before the call of compress(), the length of the compressed
28c7be98c2SXin LI    buffer is equal to the available size of the compressed buffer and not
29cdbc2952SBrian Feldman    zero.  For Visual Basic, check that this parameter is passed by reference
30cdbc2952SBrian Feldman    ("as any"), not by value ("as long").
31628b9c34SPeter Wemm
3261933f06STim Kientzle 5. deflate() or inflate() returns Z_BUF_ERROR.
33628b9c34SPeter Wemm
34c7be98c2SXin LI    Before making the call, make sure that avail_in and avail_out are not zero.
35c7be98c2SXin LI    When setting the parameter flush equal to Z_FINISH, also make sure that
36c7be98c2SXin LI    avail_out is big enough to allow processing all pending input.  Note that a
37c7be98c2SXin LI    Z_BUF_ERROR is not fatal--another call to deflate() or inflate() can be
38c7be98c2SXin LI    made with more input or output space.  A Z_BUF_ERROR may in fact be
39c7be98c2SXin LI    unavoidable depending on how the functions are used, since it is not
40c7be98c2SXin LI    possible to tell whether or not there is more output pending when
41280d433dSXin LI    strm.avail_out returns with zero.  See https://zlib.net/zlib_how.html for a
42c7be98c2SXin LI    heavily annotated example.
43628b9c34SPeter Wemm
44cdbc2952SBrian Feldman 6. Where's the zlib documentation (man pages, etc.)?
45628b9c34SPeter Wemm
4648e633e3SXin LI    It's in zlib.h .  Examples of zlib usage are in the files test/example.c
4748e633e3SXin LI    and test/minigzip.c, with more in examples/ .
48628b9c34SPeter Wemm
49cdbc2952SBrian Feldman 7. Why don't you use GNU autoconf or libtool or ...?
50628b9c34SPeter Wemm
51c7be98c2SXin LI    Because we would like to keep zlib as a very small and simple package.
52c7be98c2SXin LI    zlib is rather portable and doesn't need much configuration.
53628b9c34SPeter Wemm
54cdbc2952SBrian Feldman 8. I found a bug in zlib.
55628b9c34SPeter Wemm
56c7be98c2SXin LI    Most of the time, such problems are due to an incorrect usage of zlib.
57c7be98c2SXin LI    Please try to reproduce the problem with a small program and send the
58c7be98c2SXin LI    corresponding source to us at zlib@gzip.org .  Do not send multi-megabyte
59c7be98c2SXin LI    data files without prior agreement.
60628b9c34SPeter Wemm
61cdbc2952SBrian Feldman 9. Why do I get "undefined reference to gzputc"?
62628b9c34SPeter Wemm
63628b9c34SPeter Wemm    If "make test" produces something like
64628b9c34SPeter Wemm
65cdbc2952SBrian Feldman       example.o(.text+0x154): undefined reference to `gzputc'
66cdbc2952SBrian Feldman
67cdbc2952SBrian Feldman    check that you don't have old files libz.* in /usr/lib, /usr/local/lib or
68cdbc2952SBrian Feldman    /usr/X11R6/lib. Remove any old versions, then do "make install".
69cdbc2952SBrian Feldman
70cdbc2952SBrian Feldman10. I need a Delphi interface to zlib.
71cdbc2952SBrian Feldman
72aea8f65dSTim J. Robbins    See the contrib/delphi directory in the zlib distribution.
73cdbc2952SBrian Feldman
74cdbc2952SBrian Feldman11. Can zlib handle .zip archives?
75cdbc2952SBrian Feldman
7661933f06STim Kientzle    Not by itself, no.  See the directory contrib/minizip in the zlib
7761933f06STim Kientzle    distribution.
78cdbc2952SBrian Feldman
79cdbc2952SBrian Feldman12. Can zlib handle .Z files?
80cdbc2952SBrian Feldman
81cdbc2952SBrian Feldman    No, sorry.  You have to spawn an uncompress or gunzip subprocess, or adapt
82cdbc2952SBrian Feldman    the code of uncompress on your own.
83cdbc2952SBrian Feldman
84cdbc2952SBrian Feldman13. How can I make a Unix shared library?
85cdbc2952SBrian Feldman
8648e633e3SXin LI    By default a shared (and a static) library is built for Unix.  So:
8748e633e3SXin LI
8848e633e3SXin LI    make distclean
8948e633e3SXin LI    ./configure
90cdbc2952SBrian Feldman    make
91cdbc2952SBrian Feldman
92aea8f65dSTim J. Robbins14. How do I install a shared zlib library on Unix?
93cdbc2952SBrian Feldman
9461933f06STim Kientzle    After the above, then:
9561933f06STim Kientzle
96aea8f65dSTim J. Robbins    make install
97aea8f65dSTim J. Robbins
98aea8f65dSTim J. Robbins    However, many flavors of Unix come with a shared zlib already installed.
99aea8f65dSTim J. Robbins    Before going to the trouble of compiling a shared version of zlib and
100aea8f65dSTim J. Robbins    trying to install it, you may want to check if it's already there!  If you
101c7be98c2SXin LI    can #include <zlib.h>, it's there.  The -lz option will probably link to
102c7be98c2SXin LI    it.  You can check the version at the top of zlib.h or with the
103c7be98c2SXin LI    ZLIB_VERSION symbol defined in zlib.h .
104cdbc2952SBrian Feldman
10561933f06STim Kientzle15. I have a question about OttoPDF.
106cdbc2952SBrian Feldman
107cdbc2952SBrian Feldman    We are not the authors of OttoPDF. The real author is on the OttoPDF web
10861933f06STim Kientzle    site: Joel Hainley, jhainley@myndkryme.com.
109aea8f65dSTim J. Robbins
11061933f06STim Kientzle16. Can zlib decode Flate data in an Adobe PDF file?
11161933f06STim Kientzle
112280d433dSXin LI    Yes. See https://www.pdflib.com/ . To modify PDF forms, see
113280d433dSXin LI    https://sourceforge.net/projects/acroformtool/ .
11461933f06STim Kientzle
11561933f06STim Kientzle17. Why am I getting this "register_frame_info not found" error on Solaris?
11661933f06STim Kientzle
11761933f06STim Kientzle    After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib
11861933f06STim Kientzle    generates an error such as:
11961933f06STim Kientzle
12061933f06STim Kientzle        ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so:
12161933f06STim Kientzle        symbol __register_frame_info: referenced symbol not found
12261933f06STim Kientzle
12361933f06STim Kientzle    The symbol __register_frame_info is not part of zlib, it is generated by
12461933f06STim Kientzle    the C compiler (cc or gcc).  You must recompile applications using zlib
12561933f06STim Kientzle    which have this problem.  This problem is specific to Solaris.  See
12661933f06STim Kientzle    http://www.sunfreeware.com for Solaris versions of zlib and applications
12761933f06STim Kientzle    using zlib.
12861933f06STim Kientzle
12961933f06STim Kientzle18. Why does gzip give an error on a file I make with compress/deflate?
130aea8f65dSTim J. Robbins
131aea8f65dSTim J. Robbins    The compress and deflate functions produce data in the zlib format, which
132aea8f65dSTim J. Robbins    is different and incompatible with the gzip format.  The gz* functions in
133c7be98c2SXin LI    zlib on the other hand use the gzip format.  Both the zlib and gzip formats
134c7be98c2SXin LI    use the same compressed data format internally, but have different headers
135c7be98c2SXin LI    and trailers around the compressed data.
136aea8f65dSTim J. Robbins
13761933f06STim Kientzle19. Ok, so why are there two different formats?
138aea8f65dSTim J. Robbins
139c7be98c2SXin LI    The gzip format was designed to retain the directory information about a
140c7be98c2SXin LI    single file, such as the name and last modification date.  The zlib format
141c7be98c2SXin LI    on the other hand was designed for in-memory and communication channel
142c7be98c2SXin LI    applications, and has a much more compact header and trailer and uses a
143c7be98c2SXin LI    faster integrity check than gzip.
144aea8f65dSTim J. Robbins
14561933f06STim Kientzle20. Well that's nice, but how do I make a gzip file in memory?
146aea8f65dSTim J. Robbins
147aea8f65dSTim J. Robbins    You can request that deflate write the gzip format instead of the zlib
148c7be98c2SXin LI    format using deflateInit2().  You can also request that inflate decode the
149c7be98c2SXin LI    gzip format using inflateInit2().  Read zlib.h for more details.
150aea8f65dSTim J. Robbins
15161933f06STim Kientzle21. Is zlib thread-safe?
152aea8f65dSTim J. Robbins
153aea8f65dSTim J. Robbins    Yes.  However any library routines that zlib uses and any application-
154aea8f65dSTim J. Robbins    provided memory allocation routines must also be thread-safe.  zlib's gz*
155aea8f65dSTim J. Robbins    functions use stdio library routines, and most of zlib's functions use the
156c7be98c2SXin LI    library memory allocation routines by default.  zlib's *Init* functions
157c7be98c2SXin LI    allow for the application to provide custom memory allocation routines.
158aea8f65dSTim J. Robbins
159280d433dSXin LI    If the non-default BUILDFIXED or DYNAMIC_CRC_TABLE defines are used on a
160280d433dSXin LI    system without atomics (e.g. pre-C11), then inflate() and crc32() will not
161280d433dSXin LI    be thread safe.
162280d433dSXin LI
163aea8f65dSTim J. Robbins    Of course, you should only operate on any given zlib or gzip stream from a
164aea8f65dSTim J. Robbins    single thread at a time.
165aea8f65dSTim J. Robbins
16661933f06STim Kientzle22. Can I use zlib in my commercial application?
167aea8f65dSTim J. Robbins
168aea8f65dSTim J. Robbins    Yes.  Please read the license in zlib.h.
169aea8f65dSTim J. Robbins
17061933f06STim Kientzle23. Is zlib under the GNU license?
171aea8f65dSTim J. Robbins
172aea8f65dSTim J. Robbins    No.  Please read the license in zlib.h.
173aea8f65dSTim J. Robbins
17461933f06STim Kientzle24. The license says that altered source versions must be "plainly marked". So
175aea8f65dSTim J. Robbins    what exactly do I need to do to meet that requirement?
176aea8f65dSTim J. Robbins
177aea8f65dSTim J. Robbins    You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h.  In
178aea8f65dSTim J. Robbins    particular, the final version number needs to be changed to "f", and an
179aea8f65dSTim J. Robbins    identification string should be appended to ZLIB_VERSION.  Version numbers
180aea8f65dSTim J. Robbins    x.x.x.f are reserved for modifications to zlib by others than the zlib
181aea8f65dSTim J. Robbins    maintainers.  For example, if the version of the base zlib you are altering
182aea8f65dSTim J. Robbins    is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and
183aea8f65dSTim J. Robbins    ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3".  You can also
184aea8f65dSTim J. Robbins    update the version strings in deflate.c and inftrees.c.
185aea8f65dSTim J. Robbins
186aea8f65dSTim J. Robbins    For altered source distributions, you should also note the origin and
187aea8f65dSTim J. Robbins    nature of the changes in zlib.h, as well as in ChangeLog and README, along
188aea8f65dSTim J. Robbins    with the dates of the alterations.  The origin should include at least your
189aea8f65dSTim J. Robbins    name (or your company's name), and an email address to contact for help or
190aea8f65dSTim J. Robbins    issues with the library.
191aea8f65dSTim J. Robbins
192aea8f65dSTim J. Robbins    Note that distributing a compiled zlib library along with zlib.h and
193aea8f65dSTim J. Robbins    zconf.h is also a source distribution, and so you should change
194aea8f65dSTim J. Robbins    ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes
195aea8f65dSTim J. Robbins    in zlib.h as you would for a full source distribution.
196aea8f65dSTim J. Robbins
19761933f06STim Kientzle25. Will zlib work on a big-endian or little-endian architecture, and can I
198aea8f65dSTim J. Robbins    exchange compressed data between them?
199aea8f65dSTim J. Robbins
200aea8f65dSTim J. Robbins    Yes and yes.
201aea8f65dSTim J. Robbins
20261933f06STim Kientzle26. Will zlib work on a 64-bit machine?
203aea8f65dSTim J. Robbins
204c7be98c2SXin LI    Yes.  It has been tested on 64-bit machines, and has no dependence on any
205c7be98c2SXin LI    data types being limited to 32-bits in length.  If you have any
206aea8f65dSTim J. Robbins    difficulties, please provide a complete problem report to zlib@gzip.org
207aea8f65dSTim J. Robbins
20861933f06STim Kientzle27. Will zlib decompress data from the PKWare Data Compression Library?
209aea8f65dSTim J. Robbins
210c7be98c2SXin LI    No.  The PKWare DCL uses a completely different compressed data format than
211c7be98c2SXin LI    does PKZIP and zlib.  However, you can look in zlib's contrib/blast
212aea8f65dSTim J. Robbins    directory for a possible solution to your problem.
213aea8f65dSTim J. Robbins
21461933f06STim Kientzle28. Can I access data randomly in a compressed stream?
215aea8f65dSTim J. Robbins
216c7be98c2SXin LI    No, not without some preparation.  If when compressing you periodically use
217c7be98c2SXin LI    Z_FULL_FLUSH, carefully write all the pending data at those points, and
218c7be98c2SXin LI    keep an index of those locations, then you can start decompression at those
219c7be98c2SXin LI    points.  You have to be careful to not use Z_FULL_FLUSH too often, since it
220c7be98c2SXin LI    can significantly degrade compression.  Alternatively, you can scan a
221c7be98c2SXin LI    deflate stream once to generate an index, and then use that index for
222c7be98c2SXin LI    random access.  See examples/zran.c .
223aea8f65dSTim J. Robbins
22461933f06STim Kientzle29. Does zlib work on MVS, OS/390, CICS, etc.?
225aea8f65dSTim J. Robbins
226c7be98c2SXin LI    It has in the past, but we have not heard of any recent evidence.  There
227c7be98c2SXin LI    were working ports of zlib 1.1.4 to MVS, but those links no longer work.
228c7be98c2SXin LI    If you know of recent, successful applications of zlib on these operating
229c7be98c2SXin LI    systems, please let us know.  Thanks.
230aea8f65dSTim J. Robbins
231c7be98c2SXin LI30. Is there some simpler, easier to read version of inflate I can look at to
232c7be98c2SXin LI    understand the deflate format?
233aea8f65dSTim J. Robbins
234aea8f65dSTim J. Robbins    First off, you should read RFC 1951.  Second, yes.  Look in zlib's
235aea8f65dSTim J. Robbins    contrib/puff directory.
236aea8f65dSTim J. Robbins
23761933f06STim Kientzle31. Does zlib infringe on any patents?
238aea8f65dSTim J. Robbins
239aea8f65dSTim J. Robbins    As far as we know, no.  In fact, that was originally the whole point behind
240aea8f65dSTim J. Robbins    zlib.  Look here for some more information:
241aea8f65dSTim J. Robbins
242280d433dSXin LI    https://web.archive.org/web/20180729212847/http://www.gzip.org/#faq11
243aea8f65dSTim J. Robbins
24461933f06STim Kientzle32. Can zlib work with greater than 4 GB of data?
245aea8f65dSTim J. Robbins
246aea8f65dSTim J. Robbins    Yes.  inflate() and deflate() will process any amount of data correctly.
247aea8f65dSTim J. Robbins    Each call of inflate() or deflate() is limited to input and output chunks
248aea8f65dSTim J. Robbins    of the maximum value that can be stored in the compiler's "unsigned int"
249aea8f65dSTim J. Robbins    type, but there is no limit to the number of chunks.  Note however that the
250aea8f65dSTim J. Robbins    strm.total_in and strm_total_out counters may be limited to 4 GB.  These
251aea8f65dSTim J. Robbins    counters are provided as a convenience and are not used internally by
252aea8f65dSTim J. Robbins    inflate() or deflate().  The application can easily set up its own counters
253aea8f65dSTim J. Robbins    updated after each call of inflate() or deflate() to count beyond 4 GB.
254aea8f65dSTim J. Robbins    compress() and uncompress() may be limited to 4 GB, since they operate in a
255aea8f65dSTim J. Robbins    single call.  gzseek() and gztell() may be limited to 4 GB depending on how
256aea8f65dSTim J. Robbins    zlib is compiled.  See the zlibCompileFlags() function in zlib.h.
257aea8f65dSTim J. Robbins
258c7be98c2SXin LI    The word "may" appears several times above since there is a 4 GB limit only
259c7be98c2SXin LI    if the compiler's "long" type is 32 bits.  If the compiler's "long" type is
260c7be98c2SXin LI    64 bits, then the limit is 16 exabytes.
261aea8f65dSTim J. Robbins
26261933f06STim Kientzle33. Does zlib have any security vulnerabilities?
263aea8f65dSTim J. Robbins
264c7be98c2SXin LI    The only one that we are aware of is potentially in gzprintf().  If zlib is
265280d433dSXin LI    compiled to use sprintf() or vsprintf(), which requires that ZLIB_INSECURE
266280d433dSXin LI    be defined, then there is no protection against a buffer overflow of an 8K
267280d433dSXin LI    string space (or other value as set by gzbuffer()), other than the caller
268280d433dSXin LI    of gzprintf() assuring that the output will not exceed 8K.  On the other
269280d433dSXin LI    hand, if zlib is compiled to use snprintf() or vsnprintf(), which should
270280d433dSXin LI    normally be the case, then there is no vulnerability.  The ./configure
271280d433dSXin LI    script will display warnings if an insecure variation of sprintf() will be
272280d433dSXin LI    used by gzprintf().  Also the zlibCompileFlags() function will return
273280d433dSXin LI    information on what variant of sprintf() is used by gzprintf().
274aea8f65dSTim J. Robbins
275aea8f65dSTim J. Robbins    If you don't have snprintf() or vsnprintf() and would like one, you can
276280d433dSXin LI    find a good portable implementation in stb_sprintf.h here:
277aea8f65dSTim J. Robbins
278280d433dSXin LI        https://github.com/nothings/stb
279aea8f65dSTim J. Robbins
280aea8f65dSTim J. Robbins    Note that you should be using the most recent version of zlib.  Versions
281c7be98c2SXin LI    1.1.3 and before were subject to a double-free vulnerability, and versions
282c7be98c2SXin LI    1.2.1 and 1.2.2 were subject to an access exception when decompressing
283c7be98c2SXin LI    invalid compressed data.
284aea8f65dSTim J. Robbins
28561933f06STim Kientzle34. Is there a Java version of zlib?
286aea8f65dSTim J. Robbins
287aea8f65dSTim J. Robbins    Probably what you want is to use zlib in Java. zlib is already included
288aea8f65dSTim J. Robbins    as part of the Java SDK in the java.util.zip package. If you really want
289aea8f65dSTim J. Robbins    a version of zlib written in the Java language, look on the zlib home
290280d433dSXin LI    page for links: https://zlib.net/ .
291aea8f65dSTim J. Robbins
29261933f06STim Kientzle35. I get this or that compiler or source-code scanner warning when I crank it
29361933f06STim Kientzle    up to maximally-pedantic. Can't you guys write proper code?
294aea8f65dSTim J. Robbins
295aea8f65dSTim J. Robbins    Many years ago, we gave up attempting to avoid warnings on every compiler
296aea8f65dSTim J. Robbins    in the universe.  It just got to be a waste of time, and some compilers
297c7be98c2SXin LI    were downright silly as well as contradicted each other.  So now, we simply
298c7be98c2SXin LI    make sure that the code always works.
299aea8f65dSTim J. Robbins
30072b100abSDag-Erling Smørgrav36. Valgrind (or some similar memory access checker) says that deflate is
30172b100abSDag-Erling Smørgrav    performing a conditional jump that depends on an uninitialized value.
30272b100abSDag-Erling Smørgrav    Isn't that a bug?
30372b100abSDag-Erling Smørgrav
304c7be98c2SXin LI    No.  That is intentional for performance reasons, and the output of deflate
305c7be98c2SXin LI    is not affected.  This only started showing up recently since zlib 1.2.x
306c7be98c2SXin LI    uses malloc() by default for allocations, whereas earlier versions used
307c7be98c2SXin LI    calloc(), which zeros out the allocated memory.  Even though the code was
308c7be98c2SXin LI    correct, versions 1.2.4 and later was changed to not stimulate these
309c7be98c2SXin LI    checkers.
31072b100abSDag-Erling Smørgrav
31172b100abSDag-Erling Smørgrav37. Will zlib read the (insert any ancient or arcane format here) compressed
312aea8f65dSTim J. Robbins    data format?
313aea8f65dSTim J. Robbins
314aea8f65dSTim J. Robbins    Probably not. Look in the comp.compression FAQ for pointers to various
315aea8f65dSTim J. Robbins    formats and associated software.
316aea8f65dSTim J. Robbins
31772b100abSDag-Erling Smørgrav38. How can I encrypt/decrypt zip files with zlib?
318aea8f65dSTim J. Robbins
319c7be98c2SXin LI    zlib doesn't support encryption.  The original PKZIP encryption is very
320c7be98c2SXin LI    weak and can be broken with freely available programs.  To get strong
321280d433dSXin LI    encryption, use GnuPG, https://www.gnupg.org/ , which already includes zlib
322c7be98c2SXin LI    compression.  For PKZIP compatible "encryption", look at
323280d433dSXin LI    https://infozip.sourceforge.net/
324aea8f65dSTim J. Robbins
32572b100abSDag-Erling Smørgrav39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
326aea8f65dSTim J. Robbins
327aea8f65dSTim J. Robbins    "gzip" is the gzip format, and "deflate" is the zlib format.  They should
328c7be98c2SXin LI    probably have called the second one "zlib" instead to avoid confusion with
329c7be98c2SXin LI    the raw deflate compressed data format.  While the HTTP 1.1 RFC 2616
330aea8f65dSTim J. Robbins    correctly points to the zlib specification in RFC 1950 for the "deflate"
331aea8f65dSTim J. Robbins    transfer encoding, there have been reports of servers and browsers that
332aea8f65dSTim J. Robbins    incorrectly produce or expect raw deflate data per the deflate
33348e633e3SXin LI    specification in RFC 1951, most notably Microsoft.  So even though the
334aea8f65dSTim J. Robbins    "deflate" transfer encoding using the zlib format would be the more
335aea8f65dSTim J. Robbins    efficient approach (and in fact exactly what the zlib format was designed
336aea8f65dSTim J. Robbins    for), using the "gzip" transfer encoding is probably more reliable due to
337aea8f65dSTim J. Robbins    an unfortunate choice of name on the part of the HTTP 1.1 authors.
338aea8f65dSTim J. Robbins
339aea8f65dSTim J. Robbins    Bottom line: use the gzip format for HTTP 1.1 encoding.
340aea8f65dSTim J. Robbins
34172b100abSDag-Erling Smørgrav40. Does zlib support the new "Deflate64" format introduced by PKWare?
342aea8f65dSTim J. Robbins
343aea8f65dSTim J. Robbins    No.  PKWare has apparently decided to keep that format proprietary, since
344c7be98c2SXin LI    they have not documented it as they have previous compression formats.  In
345c7be98c2SXin LI    any case, the compression improvements are so modest compared to other more
346c7be98c2SXin LI    modern approaches, that it's not worth the effort to implement.
347aea8f65dSTim J. Robbins
348c7be98c2SXin LI41. I'm having a problem with the zip functions in zlib, can you help?
349c7be98c2SXin LI
350c7be98c2SXin LI    There are no zip functions in zlib.  You are probably using minizip by
351c7be98c2SXin LI    Giles Vollant, which is found in the contrib directory of zlib.  It is not
352c7be98c2SXin LI    part of zlib.  In fact none of the stuff in contrib is part of zlib.  The
353c7be98c2SXin LI    files in there are not supported by the zlib authors.  You need to contact
354c7be98c2SXin LI    the authors of the respective contribution for help.
355c7be98c2SXin LI
356c7be98c2SXin LI42. The match.asm code in contrib is under the GNU General Public License.
357c7be98c2SXin LI    Since it's part of zlib, doesn't that mean that all of zlib falls under the
358c7be98c2SXin LI    GNU GPL?
359c7be98c2SXin LI
360c7be98c2SXin LI    No.  The files in contrib are not part of zlib.  They were contributed by
361c7be98c2SXin LI    other authors and are provided as a convenience to the user within the zlib
362c7be98c2SXin LI    distribution.  Each item in contrib has its own license.
363c7be98c2SXin LI
364c7be98c2SXin LI43. Is zlib subject to export controls?  What is its ECCN?
365c7be98c2SXin LI
366c7be98c2SXin LI    zlib is not subject to export controls, and so is classified as EAR99.
367c7be98c2SXin LI
368c7be98c2SXin LI44. Can you please sign these lengthy legal documents and fax them back to us
369aea8f65dSTim J. Robbins    so that we can use your software in our product?
370aea8f65dSTim J. Robbins
371aea8f65dSTim J. Robbins    No. Go away. Shoo.
372