FAQ 3.51 KB
Newer Older
Tom Tromey committed
1 2 3 4 5

		Frequently Asked Questions about zlib


If your question is not there, please check the zlib home page 
6 7
http://www.zlib.org which may have more recent information.
The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
Tom Tromey committed
8 9


10
 1. Is zlib Y2K-compliant?
Tom Tromey committed
11

12
    Yes. zlib doesn't handle dates.
Tom Tromey committed
13

14
 2. Where can I get a Windows DLL version?
Tom Tromey committed
15

16 17 18
    The zlib sources can be compiled without change to produce a DLL. If you
    want a precompiled DLL, see http://www.winimage.com/zLibDll/ . Questions
    about the zlib DLL should be sent to Gilles Vollant (info@winimage.com).
Tom Tromey committed
19

20
 3. Where can I get a Visual Basic interface to zlib?
Tom Tromey committed
21

22 23 24 25
    See
        * http://www.winimage.com/zLibDll/cmp-z-it.zip
        * http://www.dogma.net/markn/articles/zlibtool/zlibtool.htm
        * contrib/visual-basic.txt in the zlib distribution
Tom Tromey committed
26

27
 4. compress() returns Z_BUF_ERROR
Tom Tromey committed
28

29 30 31 32
    Make sure that before the call of compress, the length of the compressed
    buffer is equal to the total size of the compressed buffer and not
    zero. For Visual Basic, check that this parameter is passed by reference
    ("as any"), not by value ("as long").
Tom Tromey committed
33

34
 5. deflate() or inflate() returns Z_BUF_ERROR
Tom Tromey committed
35

36 37 38
    Before making the call, make sure that avail_in and avail_out are not
    zero. When setting the parameter flush equal to Z_FINISH, also make sure
    that avail_out is big enough to allow processing all pending input.
Tom Tromey committed
39

40
 6. Where's the zlib documentation (man pages, etc.)?
Tom Tromey committed
41

42 43 44 45
    It's in zlib.h for the moment, and Francis S. Lin has converted it to a
    web page zlib.html. Volunteers to transform this to Unix-style man pages,
    please contact Jean-loup Gailly (jloup@gzip.org). Examples of zlib usage
    are in the files example.c and minigzip.c.
Tom Tromey committed
46

47
 7. Why don't you use GNU autoconf or libtool or ...?
Tom Tromey committed
48

49 50
    Because we would like to keep zlib as a very small and simple
    package. zlib is rather portable and doesn't need much configuration.
Tom Tromey committed
51

52
 8. I found a bug in zlib.
Tom Tromey committed
53

54 55 56 57
    Most of the time, such problems are due to an incorrect usage of
    zlib. Please try to reproduce the problem with a small program and send
    the corresponding source to us at zlib@gzip.org . Do not send
    multi-megabyte data files without prior agreement.
Tom Tromey committed
58

59
 9. Why do I get "undefined reference to gzputc"?
Tom Tromey committed
60

61
    If "make test" produces something like
Tom Tromey committed
62

63 64 65 66
       example.o(.text+0x154): undefined reference to `gzputc'
      
    check that you don't have old files libz.* in /usr/lib, /usr/local/lib or
    /usr/X11R6/lib. Remove any old versions, then do "make install".
Tom Tromey committed
67

68
10. I need a Delphi interface to zlib.
Tom Tromey committed
69

70 71
    See the directories contrib/delphi and contrib/delphi2 in the zlib
    distribution.
Tom Tromey committed
72

73
11. Can zlib handle .zip archives?
Tom Tromey committed
74

75
    See the directory contrib/minizip in the zlib distribution.
Tom Tromey committed
76

77
12. Can zlib handle .Z files?
Tom Tromey committed
78

79 80
    No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt
    the code of uncompress on your own.
Tom Tromey committed
81

82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
13. How can I make a Unix shared library?

    make clean
    ./configure -s
    make

14. Why does "make test" fail on Mac OS X?

    Mac OS X already includes zlib as a shared library, and so -lz links the
    shared library instead of the one that the "make" compiled. For zlib
    1.1.3, the two are incompatible due to different compile-time
    options. Simply change the -lz in the Makefile to libz.a, and it will use
    the compiled library instead of the shared one and the "make test" will
    succeed.

15. I have a question about OttoPDF

    We are not the authors of OttoPDF. The real author is on the OttoPDF web
    site Joel Hainley jhainley@myndkryme.com.