xref: /f-stack/freebsd/contrib/zlib/FAQ (revision 22ce4aff)
1*22ce4affSfengbojiang
2*22ce4affSfengbojiang                Frequently Asked Questions about zlib
3*22ce4affSfengbojiang
4*22ce4affSfengbojiang
5*22ce4affSfengbojiangIf your question is not there, please check the zlib home page
6*22ce4affSfengbojianghttp://zlib.net/ which may have more recent information.
7*22ce4affSfengbojiangThe lastest zlib FAQ is at http://zlib.net/zlib_faq.html
8*22ce4affSfengbojiang
9*22ce4affSfengbojiang
10*22ce4affSfengbojiang 1. Is zlib Y2K-compliant?
11*22ce4affSfengbojiang
12*22ce4affSfengbojiang    Yes. zlib doesn't handle dates.
13*22ce4affSfengbojiang
14*22ce4affSfengbojiang 2. Where can I get a Windows DLL version?
15*22ce4affSfengbojiang
16*22ce4affSfengbojiang    The zlib sources can be compiled without change to produce a DLL.  See the
17*22ce4affSfengbojiang    file win32/DLL_FAQ.txt in the zlib distribution.  Pointers to the
18*22ce4affSfengbojiang    precompiled DLL are found in the zlib web site at http://zlib.net/ .
19*22ce4affSfengbojiang
20*22ce4affSfengbojiang 3. Where can I get a Visual Basic interface to zlib?
21*22ce4affSfengbojiang
22*22ce4affSfengbojiang    See
23*22ce4affSfengbojiang        * http://marknelson.us/1997/01/01/zlib-engine/
24*22ce4affSfengbojiang        * win32/DLL_FAQ.txt in the zlib distribution
25*22ce4affSfengbojiang
26*22ce4affSfengbojiang 4. compress() returns Z_BUF_ERROR.
27*22ce4affSfengbojiang
28*22ce4affSfengbojiang    Make sure that before the call of compress(), the length of the compressed
29*22ce4affSfengbojiang    buffer is equal to the available size of the compressed buffer and not
30*22ce4affSfengbojiang    zero.  For Visual Basic, check that this parameter is passed by reference
31*22ce4affSfengbojiang    ("as any"), not by value ("as long").
32*22ce4affSfengbojiang
33*22ce4affSfengbojiang 5. deflate() or inflate() returns Z_BUF_ERROR.
34*22ce4affSfengbojiang
35*22ce4affSfengbojiang    Before making the call, make sure that avail_in and avail_out are not zero.
36*22ce4affSfengbojiang    When setting the parameter flush equal to Z_FINISH, also make sure that
37*22ce4affSfengbojiang    avail_out is big enough to allow processing all pending input.  Note that a
38*22ce4affSfengbojiang    Z_BUF_ERROR is not fatal--another call to deflate() or inflate() can be
39*22ce4affSfengbojiang    made with more input or output space.  A Z_BUF_ERROR may in fact be
40*22ce4affSfengbojiang    unavoidable depending on how the functions are used, since it is not
41*22ce4affSfengbojiang    possible to tell whether or not there is more output pending when
42*22ce4affSfengbojiang    strm.avail_out returns with zero.  See http://zlib.net/zlib_how.html for a
43*22ce4affSfengbojiang    heavily annotated example.
44*22ce4affSfengbojiang
45*22ce4affSfengbojiang 6. Where's the zlib documentation (man pages, etc.)?
46*22ce4affSfengbojiang
47*22ce4affSfengbojiang    It's in zlib.h .  Examples of zlib usage are in the files test/example.c
48*22ce4affSfengbojiang    and test/minigzip.c, with more in examples/ .
49*22ce4affSfengbojiang
50*22ce4affSfengbojiang 7. Why don't you use GNU autoconf or libtool or ...?
51*22ce4affSfengbojiang
52*22ce4affSfengbojiang    Because we would like to keep zlib as a very small and simple package.
53*22ce4affSfengbojiang    zlib is rather portable and doesn't need much configuration.
54*22ce4affSfengbojiang
55*22ce4affSfengbojiang 8. I found a bug in zlib.
56*22ce4affSfengbojiang
57*22ce4affSfengbojiang    Most of the time, such problems are due to an incorrect usage of zlib.
58*22ce4affSfengbojiang    Please try to reproduce the problem with a small program and send the
59*22ce4affSfengbojiang    corresponding source to us at [email protected] .  Do not send multi-megabyte
60*22ce4affSfengbojiang    data files without prior agreement.
61*22ce4affSfengbojiang
62*22ce4affSfengbojiang 9. Why do I get "undefined reference to gzputc"?
63*22ce4affSfengbojiang
64*22ce4affSfengbojiang    If "make test" produces something like
65*22ce4affSfengbojiang
66*22ce4affSfengbojiang       example.o(.text+0x154): undefined reference to `gzputc'
67*22ce4affSfengbojiang
68*22ce4affSfengbojiang    check that you don't have old files libz.* in /usr/lib, /usr/local/lib or
69*22ce4affSfengbojiang    /usr/X11R6/lib. Remove any old versions, then do "make install".
70*22ce4affSfengbojiang
71*22ce4affSfengbojiang10. I need a Delphi interface to zlib.
72*22ce4affSfengbojiang
73*22ce4affSfengbojiang    See the contrib/delphi directory in the zlib distribution.
74*22ce4affSfengbojiang
75*22ce4affSfengbojiang11. Can zlib handle .zip archives?
76*22ce4affSfengbojiang
77*22ce4affSfengbojiang    Not by itself, no.  See the directory contrib/minizip in the zlib
78*22ce4affSfengbojiang    distribution.
79*22ce4affSfengbojiang
80*22ce4affSfengbojiang12. Can zlib handle .Z files?
81*22ce4affSfengbojiang
82*22ce4affSfengbojiang    No, sorry.  You have to spawn an uncompress or gunzip subprocess, or adapt
83*22ce4affSfengbojiang    the code of uncompress on your own.
84*22ce4affSfengbojiang
85*22ce4affSfengbojiang13. How can I make a Unix shared library?
86*22ce4affSfengbojiang
87*22ce4affSfengbojiang    By default a shared (and a static) library is built for Unix.  So:
88*22ce4affSfengbojiang
89*22ce4affSfengbojiang    make distclean
90*22ce4affSfengbojiang    ./configure
91*22ce4affSfengbojiang    make
92*22ce4affSfengbojiang
93*22ce4affSfengbojiang14. How do I install a shared zlib library on Unix?
94*22ce4affSfengbojiang
95*22ce4affSfengbojiang    After the above, then:
96*22ce4affSfengbojiang
97*22ce4affSfengbojiang    make install
98*22ce4affSfengbojiang
99*22ce4affSfengbojiang    However, many flavors of Unix come with a shared zlib already installed.
100*22ce4affSfengbojiang    Before going to the trouble of compiling a shared version of zlib and
101*22ce4affSfengbojiang    trying to install it, you may want to check if it's already there!  If you
102*22ce4affSfengbojiang    can #include <zlib.h>, it's there.  The -lz option will probably link to
103*22ce4affSfengbojiang    it.  You can check the version at the top of zlib.h or with the
104*22ce4affSfengbojiang    ZLIB_VERSION symbol defined in zlib.h .
105*22ce4affSfengbojiang
106*22ce4affSfengbojiang15. I have a question about OttoPDF.
107*22ce4affSfengbojiang
108*22ce4affSfengbojiang    We are not the authors of OttoPDF. The real author is on the OttoPDF web
109*22ce4affSfengbojiang    site: Joel Hainley, [email protected].
110*22ce4affSfengbojiang
111*22ce4affSfengbojiang16. Can zlib decode Flate data in an Adobe PDF file?
112*22ce4affSfengbojiang
113*22ce4affSfengbojiang    Yes. See http://www.pdflib.com/ . To modify PDF forms, see
114*22ce4affSfengbojiang    http://sourceforge.net/projects/acroformtool/ .
115*22ce4affSfengbojiang
116*22ce4affSfengbojiang17. Why am I getting this "register_frame_info not found" error on Solaris?
117*22ce4affSfengbojiang
118*22ce4affSfengbojiang    After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib
119*22ce4affSfengbojiang    generates an error such as:
120*22ce4affSfengbojiang
121*22ce4affSfengbojiang        ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so:
122*22ce4affSfengbojiang        symbol __register_frame_info: referenced symbol not found
123*22ce4affSfengbojiang
124*22ce4affSfengbojiang    The symbol __register_frame_info is not part of zlib, it is generated by
125*22ce4affSfengbojiang    the C compiler (cc or gcc).  You must recompile applications using zlib
126*22ce4affSfengbojiang    which have this problem.  This problem is specific to Solaris.  See
127*22ce4affSfengbojiang    http://www.sunfreeware.com for Solaris versions of zlib and applications
128*22ce4affSfengbojiang    using zlib.
129*22ce4affSfengbojiang
130*22ce4affSfengbojiang18. Why does gzip give an error on a file I make with compress/deflate?
131*22ce4affSfengbojiang
132*22ce4affSfengbojiang    The compress and deflate functions produce data in the zlib format, which
133*22ce4affSfengbojiang    is different and incompatible with the gzip format.  The gz* functions in
134*22ce4affSfengbojiang    zlib on the other hand use the gzip format.  Both the zlib and gzip formats
135*22ce4affSfengbojiang    use the same compressed data format internally, but have different headers
136*22ce4affSfengbojiang    and trailers around the compressed data.
137*22ce4affSfengbojiang
138*22ce4affSfengbojiang19. Ok, so why are there two different formats?
139*22ce4affSfengbojiang
140*22ce4affSfengbojiang    The gzip format was designed to retain the directory information about a
141*22ce4affSfengbojiang    single file, such as the name and last modification date.  The zlib format
142*22ce4affSfengbojiang    on the other hand was designed for in-memory and communication channel
143*22ce4affSfengbojiang    applications, and has a much more compact header and trailer and uses a
144*22ce4affSfengbojiang    faster integrity check than gzip.
145*22ce4affSfengbojiang
146*22ce4affSfengbojiang20. Well that's nice, but how do I make a gzip file in memory?
147*22ce4affSfengbojiang
148*22ce4affSfengbojiang    You can request that deflate write the gzip format instead of the zlib
149*22ce4affSfengbojiang    format using deflateInit2().  You can also request that inflate decode the
150*22ce4affSfengbojiang    gzip format using inflateInit2().  Read zlib.h for more details.
151*22ce4affSfengbojiang
152*22ce4affSfengbojiang21. Is zlib thread-safe?
153*22ce4affSfengbojiang
154*22ce4affSfengbojiang    Yes.  However any library routines that zlib uses and any application-
155*22ce4affSfengbojiang    provided memory allocation routines must also be thread-safe.  zlib's gz*
156*22ce4affSfengbojiang    functions use stdio library routines, and most of zlib's functions use the
157*22ce4affSfengbojiang    library memory allocation routines by default.  zlib's *Init* functions
158*22ce4affSfengbojiang    allow for the application to provide custom memory allocation routines.
159*22ce4affSfengbojiang
160*22ce4affSfengbojiang    Of course, you should only operate on any given zlib or gzip stream from a
161*22ce4affSfengbojiang    single thread at a time.
162*22ce4affSfengbojiang
163*22ce4affSfengbojiang22. Can I use zlib in my commercial application?
164*22ce4affSfengbojiang
165*22ce4affSfengbojiang    Yes.  Please read the license in zlib.h.
166*22ce4affSfengbojiang
167*22ce4affSfengbojiang23. Is zlib under the GNU license?
168*22ce4affSfengbojiang
169*22ce4affSfengbojiang    No.  Please read the license in zlib.h.
170*22ce4affSfengbojiang
171*22ce4affSfengbojiang24. The license says that altered source versions must be "plainly marked". So
172*22ce4affSfengbojiang    what exactly do I need to do to meet that requirement?
173*22ce4affSfengbojiang
174*22ce4affSfengbojiang    You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h.  In
175*22ce4affSfengbojiang    particular, the final version number needs to be changed to "f", and an
176*22ce4affSfengbojiang    identification string should be appended to ZLIB_VERSION.  Version numbers
177*22ce4affSfengbojiang    x.x.x.f are reserved for modifications to zlib by others than the zlib
178*22ce4affSfengbojiang    maintainers.  For example, if the version of the base zlib you are altering
179*22ce4affSfengbojiang    is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and
180*22ce4affSfengbojiang    ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3".  You can also
181*22ce4affSfengbojiang    update the version strings in deflate.c and inftrees.c.
182*22ce4affSfengbojiang
183*22ce4affSfengbojiang    For altered source distributions, you should also note the origin and
184*22ce4affSfengbojiang    nature of the changes in zlib.h, as well as in ChangeLog and README, along
185*22ce4affSfengbojiang    with the dates of the alterations.  The origin should include at least your
186*22ce4affSfengbojiang    name (or your company's name), and an email address to contact for help or
187*22ce4affSfengbojiang    issues with the library.
188*22ce4affSfengbojiang
189*22ce4affSfengbojiang    Note that distributing a compiled zlib library along with zlib.h and
190*22ce4affSfengbojiang    zconf.h is also a source distribution, and so you should change
191*22ce4affSfengbojiang    ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes
192*22ce4affSfengbojiang    in zlib.h as you would for a full source distribution.
193*22ce4affSfengbojiang
194*22ce4affSfengbojiang25. Will zlib work on a big-endian or little-endian architecture, and can I
195*22ce4affSfengbojiang    exchange compressed data between them?
196*22ce4affSfengbojiang
197*22ce4affSfengbojiang    Yes and yes.
198*22ce4affSfengbojiang
199*22ce4affSfengbojiang26. Will zlib work on a 64-bit machine?
200*22ce4affSfengbojiang
201*22ce4affSfengbojiang    Yes.  It has been tested on 64-bit machines, and has no dependence on any
202*22ce4affSfengbojiang    data types being limited to 32-bits in length.  If you have any
203*22ce4affSfengbojiang    difficulties, please provide a complete problem report to [email protected]
204*22ce4affSfengbojiang
205*22ce4affSfengbojiang27. Will zlib decompress data from the PKWare Data Compression Library?
206*22ce4affSfengbojiang
207*22ce4affSfengbojiang    No.  The PKWare DCL uses a completely different compressed data format than
208*22ce4affSfengbojiang    does PKZIP and zlib.  However, you can look in zlib's contrib/blast
209*22ce4affSfengbojiang    directory for a possible solution to your problem.
210*22ce4affSfengbojiang
211*22ce4affSfengbojiang28. Can I access data randomly in a compressed stream?
212*22ce4affSfengbojiang
213*22ce4affSfengbojiang    No, not without some preparation.  If when compressing you periodically use
214*22ce4affSfengbojiang    Z_FULL_FLUSH, carefully write all the pending data at those points, and
215*22ce4affSfengbojiang    keep an index of those locations, then you can start decompression at those
216*22ce4affSfengbojiang    points.  You have to be careful to not use Z_FULL_FLUSH too often, since it
217*22ce4affSfengbojiang    can significantly degrade compression.  Alternatively, you can scan a
218*22ce4affSfengbojiang    deflate stream once to generate an index, and then use that index for
219*22ce4affSfengbojiang    random access.  See examples/zran.c .
220*22ce4affSfengbojiang
221*22ce4affSfengbojiang29. Does zlib work on MVS, OS/390, CICS, etc.?
222*22ce4affSfengbojiang
223*22ce4affSfengbojiang    It has in the past, but we have not heard of any recent evidence.  There
224*22ce4affSfengbojiang    were working ports of zlib 1.1.4 to MVS, but those links no longer work.
225*22ce4affSfengbojiang    If you know of recent, successful applications of zlib on these operating
226*22ce4affSfengbojiang    systems, please let us know.  Thanks.
227*22ce4affSfengbojiang
228*22ce4affSfengbojiang30. Is there some simpler, easier to read version of inflate I can look at to
229*22ce4affSfengbojiang    understand the deflate format?
230*22ce4affSfengbojiang
231*22ce4affSfengbojiang    First off, you should read RFC 1951.  Second, yes.  Look in zlib's
232*22ce4affSfengbojiang    contrib/puff directory.
233*22ce4affSfengbojiang
234*22ce4affSfengbojiang31. Does zlib infringe on any patents?
235*22ce4affSfengbojiang
236*22ce4affSfengbojiang    As far as we know, no.  In fact, that was originally the whole point behind
237*22ce4affSfengbojiang    zlib.  Look here for some more information:
238*22ce4affSfengbojiang
239*22ce4affSfengbojiang    http://www.gzip.org/#faq11
240*22ce4affSfengbojiang
241*22ce4affSfengbojiang32. Can zlib work with greater than 4 GB of data?
242*22ce4affSfengbojiang
243*22ce4affSfengbojiang    Yes.  inflate() and deflate() will process any amount of data correctly.
244*22ce4affSfengbojiang    Each call of inflate() or deflate() is limited to input and output chunks
245*22ce4affSfengbojiang    of the maximum value that can be stored in the compiler's "unsigned int"
246*22ce4affSfengbojiang    type, but there is no limit to the number of chunks.  Note however that the
247*22ce4affSfengbojiang    strm.total_in and strm_total_out counters may be limited to 4 GB.  These
248*22ce4affSfengbojiang    counters are provided as a convenience and are not used internally by
249*22ce4affSfengbojiang    inflate() or deflate().  The application can easily set up its own counters
250*22ce4affSfengbojiang    updated after each call of inflate() or deflate() to count beyond 4 GB.
251*22ce4affSfengbojiang    compress() and uncompress() may be limited to 4 GB, since they operate in a
252*22ce4affSfengbojiang    single call.  gzseek() and gztell() may be limited to 4 GB depending on how
253*22ce4affSfengbojiang    zlib is compiled.  See the zlibCompileFlags() function in zlib.h.
254*22ce4affSfengbojiang
255*22ce4affSfengbojiang    The word "may" appears several times above since there is a 4 GB limit only
256*22ce4affSfengbojiang    if the compiler's "long" type is 32 bits.  If the compiler's "long" type is
257*22ce4affSfengbojiang    64 bits, then the limit is 16 exabytes.
258*22ce4affSfengbojiang
259*22ce4affSfengbojiang33. Does zlib have any security vulnerabilities?
260*22ce4affSfengbojiang
261*22ce4affSfengbojiang    The only one that we are aware of is potentially in gzprintf().  If zlib is
262*22ce4affSfengbojiang    compiled to use sprintf() or vsprintf(), then there is no protection
263*22ce4affSfengbojiang    against a buffer overflow of an 8K string space (or other value as set by
264*22ce4affSfengbojiang    gzbuffer()), other than the caller of gzprintf() assuring that the output
265*22ce4affSfengbojiang    will not exceed 8K.  On the other hand, if zlib is compiled to use
266*22ce4affSfengbojiang    snprintf() or vsnprintf(), which should normally be the case, then there is
267*22ce4affSfengbojiang    no vulnerability.  The ./configure script will display warnings if an
268*22ce4affSfengbojiang    insecure variation of sprintf() will be used by gzprintf().  Also the
269*22ce4affSfengbojiang    zlibCompileFlags() function will return information on what variant of
270*22ce4affSfengbojiang    sprintf() is used by gzprintf().
271*22ce4affSfengbojiang
272*22ce4affSfengbojiang    If you don't have snprintf() or vsnprintf() and would like one, you can
273*22ce4affSfengbojiang    find a portable implementation here:
274*22ce4affSfengbojiang
275*22ce4affSfengbojiang        http://www.ijs.si/software/snprintf/
276*22ce4affSfengbojiang
277*22ce4affSfengbojiang    Note that you should be using the most recent version of zlib.  Versions
278*22ce4affSfengbojiang    1.1.3 and before were subject to a double-free vulnerability, and versions
279*22ce4affSfengbojiang    1.2.1 and 1.2.2 were subject to an access exception when decompressing
280*22ce4affSfengbojiang    invalid compressed data.
281*22ce4affSfengbojiang
282*22ce4affSfengbojiang34. Is there a Java version of zlib?
283*22ce4affSfengbojiang
284*22ce4affSfengbojiang    Probably what you want is to use zlib in Java. zlib is already included
285*22ce4affSfengbojiang    as part of the Java SDK in the java.util.zip package. If you really want
286*22ce4affSfengbojiang    a version of zlib written in the Java language, look on the zlib home
287*22ce4affSfengbojiang    page for links: http://zlib.net/ .
288*22ce4affSfengbojiang
289*22ce4affSfengbojiang35. I get this or that compiler or source-code scanner warning when I crank it
290*22ce4affSfengbojiang    up to maximally-pedantic. Can't you guys write proper code?
291*22ce4affSfengbojiang
292*22ce4affSfengbojiang    Many years ago, we gave up attempting to avoid warnings on every compiler
293*22ce4affSfengbojiang    in the universe.  It just got to be a waste of time, and some compilers
294*22ce4affSfengbojiang    were downright silly as well as contradicted each other.  So now, we simply
295*22ce4affSfengbojiang    make sure that the code always works.
296*22ce4affSfengbojiang
297*22ce4affSfengbojiang36. Valgrind (or some similar memory access checker) says that deflate is
298*22ce4affSfengbojiang    performing a conditional jump that depends on an uninitialized value.
299*22ce4affSfengbojiang    Isn't that a bug?
300*22ce4affSfengbojiang
301*22ce4affSfengbojiang    No.  That is intentional for performance reasons, and the output of deflate
302*22ce4affSfengbojiang    is not affected.  This only started showing up recently since zlib 1.2.x
303*22ce4affSfengbojiang    uses malloc() by default for allocations, whereas earlier versions used
304*22ce4affSfengbojiang    calloc(), which zeros out the allocated memory.  Even though the code was
305*22ce4affSfengbojiang    correct, versions 1.2.4 and later was changed to not stimulate these
306*22ce4affSfengbojiang    checkers.
307*22ce4affSfengbojiang
308*22ce4affSfengbojiang37. Will zlib read the (insert any ancient or arcane format here) compressed
309*22ce4affSfengbojiang    data format?
310*22ce4affSfengbojiang
311*22ce4affSfengbojiang    Probably not. Look in the comp.compression FAQ for pointers to various
312*22ce4affSfengbojiang    formats and associated software.
313*22ce4affSfengbojiang
314*22ce4affSfengbojiang38. How can I encrypt/decrypt zip files with zlib?
315*22ce4affSfengbojiang
316*22ce4affSfengbojiang    zlib doesn't support encryption.  The original PKZIP encryption is very
317*22ce4affSfengbojiang    weak and can be broken with freely available programs.  To get strong
318*22ce4affSfengbojiang    encryption, use GnuPG, http://www.gnupg.org/ , which already includes zlib
319*22ce4affSfengbojiang    compression.  For PKZIP compatible "encryption", look at
320*22ce4affSfengbojiang    http://www.info-zip.org/
321*22ce4affSfengbojiang
322*22ce4affSfengbojiang39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
323*22ce4affSfengbojiang
324*22ce4affSfengbojiang    "gzip" is the gzip format, and "deflate" is the zlib format.  They should
325*22ce4affSfengbojiang    probably have called the second one "zlib" instead to avoid confusion with
326*22ce4affSfengbojiang    the raw deflate compressed data format.  While the HTTP 1.1 RFC 2616
327*22ce4affSfengbojiang    correctly points to the zlib specification in RFC 1950 for the "deflate"
328*22ce4affSfengbojiang    transfer encoding, there have been reports of servers and browsers that
329*22ce4affSfengbojiang    incorrectly produce or expect raw deflate data per the deflate
330*22ce4affSfengbojiang    specification in RFC 1951, most notably Microsoft.  So even though the
331*22ce4affSfengbojiang    "deflate" transfer encoding using the zlib format would be the more
332*22ce4affSfengbojiang    efficient approach (and in fact exactly what the zlib format was designed
333*22ce4affSfengbojiang    for), using the "gzip" transfer encoding is probably more reliable due to
334*22ce4affSfengbojiang    an unfortunate choice of name on the part of the HTTP 1.1 authors.
335*22ce4affSfengbojiang
336*22ce4affSfengbojiang    Bottom line: use the gzip format for HTTP 1.1 encoding.
337*22ce4affSfengbojiang
338*22ce4affSfengbojiang40. Does zlib support the new "Deflate64" format introduced by PKWare?
339*22ce4affSfengbojiang
340*22ce4affSfengbojiang    No.  PKWare has apparently decided to keep that format proprietary, since
341*22ce4affSfengbojiang    they have not documented it as they have previous compression formats.  In
342*22ce4affSfengbojiang    any case, the compression improvements are so modest compared to other more
343*22ce4affSfengbojiang    modern approaches, that it's not worth the effort to implement.
344*22ce4affSfengbojiang
345*22ce4affSfengbojiang41. I'm having a problem with the zip functions in zlib, can you help?
346*22ce4affSfengbojiang
347*22ce4affSfengbojiang    There are no zip functions in zlib.  You are probably using minizip by
348*22ce4affSfengbojiang    Giles Vollant, which is found in the contrib directory of zlib.  It is not
349*22ce4affSfengbojiang    part of zlib.  In fact none of the stuff in contrib is part of zlib.  The
350*22ce4affSfengbojiang    files in there are not supported by the zlib authors.  You need to contact
351*22ce4affSfengbojiang    the authors of the respective contribution for help.
352*22ce4affSfengbojiang
353*22ce4affSfengbojiang42. The match.asm code in contrib is under the GNU General Public License.
354*22ce4affSfengbojiang    Since it's part of zlib, doesn't that mean that all of zlib falls under the
355*22ce4affSfengbojiang    GNU GPL?
356*22ce4affSfengbojiang
357*22ce4affSfengbojiang    No.  The files in contrib are not part of zlib.  They were contributed by
358*22ce4affSfengbojiang    other authors and are provided as a convenience to the user within the zlib
359*22ce4affSfengbojiang    distribution.  Each item in contrib has its own license.
360*22ce4affSfengbojiang
361*22ce4affSfengbojiang43. Is zlib subject to export controls?  What is its ECCN?
362*22ce4affSfengbojiang
363*22ce4affSfengbojiang    zlib is not subject to export controls, and so is classified as EAR99.
364*22ce4affSfengbojiang
365*22ce4affSfengbojiang44. Can you please sign these lengthy legal documents and fax them back to us
366*22ce4affSfengbojiang    so that we can use your software in our product?
367*22ce4affSfengbojiang
368*22ce4affSfengbojiang    No. Go away. Shoo.
369