source: trunk/essentials/sys-libs/zlib/FAQ@ 3326

Last change on this file since 3326 was 3311, checked in by bird, 19 years ago

zlib 1.2.3

File size: 14.7 KB
Line 
1
2 Frequently Asked Questions about zlib
3
4
5If your question is not there, please check the zlib home page
6http://www.zlib.org which may have more recent information.
7The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
8
9
10 1. Is zlib Y2K-compliant?
11
12 Yes. zlib doesn't handle dates.
13
14 2. Where can I get a Windows DLL version?
15
16 The zlib sources can be compiled without change to produce a DLL.
17 See the file win32/DLL_FAQ.txt in the zlib distribution.
18 Pointers to the precompiled DLL are found in the zlib web site at
19 http://www.zlib.org.
20
21 3. Where can I get a Visual Basic interface to zlib?
22
23 See
24 * http://www.dogma.net/markn/articles/zlibtool/zlibtool.htm
25 * contrib/visual-basic.txt in the zlib distribution
26 * win32/DLL_FAQ.txt in the zlib distribution
27
28 4. compress() returns Z_BUF_ERROR.
29
30 Make sure that before the call of compress, the length of the compressed
31 buffer is equal to the total size of the compressed buffer and not
32 zero. For Visual Basic, check that this parameter is passed by reference
33 ("as any"), not by value ("as long").
34
35 5. deflate() or inflate() returns Z_BUF_ERROR.
36
37 Before making the call, make sure that avail_in and avail_out are not
38 zero. When setting the parameter flush equal to Z_FINISH, also make sure
39 that avail_out is big enough to allow processing all pending input.
40 Note that a Z_BUF_ERROR is not fatal--another call to deflate() or
41 inflate() can be made with more input or output space. A Z_BUF_ERROR
42 may in fact be unavoidable depending on how the functions are used, since
43 it is not possible to tell whether or not there is more output pending
44 when strm.avail_out returns with zero.
45
46 6. Where's the zlib documentation (man pages, etc.)?
47
48 It's in zlib.h for the moment, and Francis S. Lin has converted it to a
49 web page zlib.html. Volunteers to transform this to Unix-style man pages,
50 please contact us ([email protected]). Examples of zlib usage are in the files
51 example.c and minigzip.c.
52
53 7. Why don't you use GNU autoconf or libtool or ...?
54
55 Because we would like to keep zlib as a very small and simple
56 package. zlib is rather portable and doesn't need much configuration.
57
58 8. I found a bug in zlib.
59
60 Most of the time, such problems are due to an incorrect usage of
61 zlib. Please try to reproduce the problem with a small program and send
62 the corresponding source to us at [email protected] . Do not send
63 multi-megabyte data files without prior agreement.
64
65 9. Why do I get "undefined reference to gzputc"?
66
67 If "make test" produces something like
68
69 example.o(.text+0x154): undefined reference to `gzputc'
70
71 check that you don't have old files libz.* in /usr/lib, /usr/local/lib or
72 /usr/X11R6/lib. Remove any old versions, then do "make install".
73
7410. I need a Delphi interface to zlib.
75
76 See the contrib/delphi directory in the zlib distribution.
77
7811. Can zlib handle .zip archives?
79
80 Not by itself, no. See the directory contrib/minizip in the zlib
81 distribution.
82
8312. Can zlib handle .Z files?
84
85 No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt
86 the code of uncompress on your own.
87
8813. How can I make a Unix shared library?
89
90 make clean
91 ./configure -s
92 make
93
9414. How do I install a shared zlib library on Unix?
95
96 After the above, then:
97
98 make install
99
100 However, many flavors of Unix come with a shared zlib already installed.
101 Before going to the trouble of compiling a shared version of zlib and
102 trying to install it, you may want to check if it's already there! If you
103 can #include <zlib.h>, it's there. The -lz option will probably link to it.
104
10515. I have a question about OttoPDF.
106
107 We are not the authors of OttoPDF. The real author is on the OttoPDF web
108 site: Joel Hainley, [email protected].
109
11016. Can zlib decode Flate data in an Adobe PDF file?
111
112 Yes. See http://www.fastio.com/ (ClibPDF), or http://www.pdflib.com/ .
113 To modify PDF forms, see http://sourceforge.net/projects/acroformtool/ .
114
11517. Why am I getting this "register_frame_info not found" error on Solaris?
116