diff options
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | FAQ | 4 | ||||
-rw-r--r-- | INDEX | 4 | ||||
-rw-r--r-- | Makefile.in | 16 | ||||
-rw-r--r-- | README | 12 | ||||
-rw-r--r-- | contrib/delphi/zlibd32.mak | 4 | ||||
-rw-r--r-- | contrib/pascal/zlibd32.mak | 4 | ||||
-rw-r--r-- | examples/README.examples | 9 | ||||
-rw-r--r-- | make_vms.com | 8 | ||||
-rw-r--r-- | msdos/Makefile.bor | 4 | ||||
-rw-r--r-- | msdos/Makefile.msc | 4 | ||||
-rw-r--r-- | msdos/Makefile.tc | 4 | ||||
-rw-r--r-- | old/visualc6/example.dsp | 2 | ||||
-rw-r--r-- | test/example.c (renamed from examples/example.c) | 0 | ||||
-rw-r--r-- | test/minigzip.c (renamed from examples/minigzip.c) | 0 | ||||
-rw-r--r-- | win32/Makefile.bor | 4 | ||||
-rw-r--r-- | win32/Makefile.msc | 4 | ||||
-rw-r--r-- | zlib.3 | 6 | ||||
-rw-r--r-- | zlib.3.pdf | bin | 8722 -> 8746 bytes |
19 files changed, 45 insertions, 52 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a64fe0b..e173dd7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -171,20 +171,20 @@ endif() | |||
171 | # Example binaries | 171 | # Example binaries |
172 | #============================================================================ | 172 | #============================================================================ |
173 | 173 | ||
174 | add_executable(example example.c) | 174 | add_executable(example test/example.c) |
175 | target_link_libraries(example zlib) | 175 | target_link_libraries(example zlib) |
176 | add_test(example example) | 176 | add_test(example example) |
177 | 177 | ||
178 | add_executable(minigzip minigzip.c) | 178 | add_executable(minigzip test/minigzip.c) |
179 | target_link_libraries(minigzip zlib) | 179 | target_link_libraries(minigzip zlib) |
180 | 180 | ||
181 | if(HAVE_OFF64_T) | 181 | if(HAVE_OFF64_T) |
182 | add_executable(example64 example.c) | 182 | add_executable(example64 test/example.c) |
183 | target_link_libraries(example64 zlib) | 183 | target_link_libraries(example64 zlib) |
184 | set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") | 184 | set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") |
185 | add_test(example64 example64) | 185 | add_test(example64 example64) |
186 | 186 | ||
187 | add_executable(minigzip64 minigzip.c) | 187 | add_executable(minigzip64 test/minigzip.c) |
188 | target_link_libraries(minigzip64 zlib) | 188 | target_link_libraries(minigzip64 zlib) |
189 | set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") | 189 | set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") |
190 | endif() | 190 | endif() |
@@ -44,8 +44,8 @@ The lastest zlib FAQ is at http://zlib.net/zlib_faq.html | |||
44 | 44 | ||
45 | 6. Where's the zlib documentation (man pages, etc.)? | 45 | 6. Where's the zlib documentation (man pages, etc.)? |
46 | 46 | ||
47 | It's in zlib.h . Examples of zlib usage are in the files example.c and | 47 | It's in zlib.h . Examples of zlib usage are in the files test/example.c |
48 | minigzip.c, with more in examples/ . | 48 | and test/minigzip.c, with more in examples/ . |
49 | 49 | ||
50 | 7. Why don't you use GNU autoconf or libtool or ...? | 50 | 7. Why don't you use GNU autoconf or libtool or ...? |
51 | 51 | ||
@@ -7,6 +7,8 @@ Makefile.in template for Unix Makefile | |||
7 | README guess what | 7 | README guess what |
8 | configure configure script for Unix | 8 | configure configure script for Unix |
9 | make_vms.com makefile for VMS | 9 | make_vms.com makefile for VMS |
10 | test/example.c zlib usages examples for build testing | ||
11 | test/minigzip.c minimal gzip-like functionality for build testing | ||
10 | treebuild.xml XML description of source file dependencies | 12 | treebuild.xml XML description of source file dependencies |
11 | zconf.h.cmakein zconf.h template for cmake | 13 | zconf.h.cmakein zconf.h template for cmake |
12 | zconf.h.in zconf.h template for configure | 14 | zconf.h.in zconf.h template for configure |
@@ -17,7 +19,7 @@ zlib.pc.in Template for pkg-config descriptor | |||
17 | zlib2ansi perl script to convert source files for C++ compilation | 19 | zlib2ansi perl script to convert source files for C++ compilation |
18 | 20 | ||
19 | amiga/ makefiles for Amiga SAS C | 21 | amiga/ makefiles for Amiga SAS C |
20 | as400/ makefiles for AS/400 | 22 | as400/ makefiles for AS/400 |
21 | doc/ documentation for formats and algorithms | 23 | doc/ documentation for formats and algorithms |
22 | msdos/ makefiles for MSDOS | 24 | msdos/ makefiles for MSDOS |
23 | nintendods/ makefile for Nintendo DS | 25 | nintendods/ makefile for Nintendo DS |
diff --git a/Makefile.in b/Makefile.in index 01a9016..f349569 100644 --- a/Makefile.in +++ b/Makefile.in | |||
@@ -127,17 +127,17 @@ match.lo: match.S | |||
127 | mv _match.o match.lo | 127 | mv _match.o match.lo |
128 | rm -f _match.s | 128 | rm -f _match.s |
129 | 129 | ||
130 | example.o: examples/example.c zlib.h zconf.h | 130 | example.o: test/example.c zlib.h zconf.h |
131 | $(CC) $(CFLAGS) -I. -c -o $@ examples/example.c | 131 | $(CC) $(CFLAGS) -I. -c -o $@ test/example.c |
132 | 132 | ||
133 | minigzip.o: examples/minigzip.c zlib.h zconf.h | 133 | minigzip.o: test/minigzip.c zlib.h zconf.h |
134 | $(CC) $(CFLAGS) -I. -c -o $@ examples/minigzip.c | 134 | $(CC) $(CFLAGS) -I. -c -o $@ test/minigzip.c |
135 | 135 | ||
136 | example64.o: examples/example.c zlib.h zconf.h | 136 | example64.o: test/example.c zlib.h zconf.h |
137 | $(CC) $(CFLAGS) -I. -D_FILE_OFFSET_BITS=64 -c -o $@ examples/example.c | 137 | $(CC) $(CFLAGS) -I. -D_FILE_OFFSET_BITS=64 -c -o $@ test/example.c |
138 | 138 | ||
139 | minigzip64.o: examples/minigzip.c zlib.h zconf.h | 139 | minigzip64.o: test/minigzip.c zlib.h zconf.h |
140 | $(CC) $(CFLAGS) -I. -D_FILE_OFFSET_BITS=64 -c -o $@ examples/minigzip.c | 140 | $(CC) $(CFLAGS) -I. -D_FILE_OFFSET_BITS=64 -c -o $@ test/minigzip.c |
141 | 141 | ||
142 | .SUFFIXES: .lo | 142 | .SUFFIXES: .lo |
143 | 143 | ||
@@ -8,15 +8,15 @@ rfc1952 (gzip format). | |||
8 | 8 | ||
9 | All functions of the compression library are documented in the file zlib.h | 9 | All functions of the compression library are documented in the file zlib.h |
10 | (volunteer to write man pages welcome, contact zlib@gzip.org). A usage example | 10 | (volunteer to write man pages welcome, contact zlib@gzip.org). A usage example |
11 | of the library is given in the file example.c which also tests that the library | 11 | of the library is given in the file test/example.c which also tests that |
12 | is working correctly. Another example is given in the file minigzip.c. The | 12 | the library is working correctly. Another example is given in the file |
13 | compression library itself is composed of all source files except example.c and | 13 | test/minigzip.c. The compression library itself is composed of all source |
14 | minigzip.c. | 14 | files in the root directory. |
15 | 15 | ||
16 | To compile all files and run the test program, follow the instructions given at | 16 | To compile all files and run the test program, follow the instructions given at |
17 | the top of Makefile.in. In short "./configure; make test", and if that goes | 17 | the top of Makefile.in. In short "./configure; make test", and if that goes |
18 | well, "make install" should work for most flavors of Unix. For Windows, use one | 18 | well, "make install" should work for most flavors of Unix. For Windows, use |
19 | of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use | 19 | one of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use |
20 | make_vms.com. | 20 | make_vms.com. |
21 | 21 | ||
22 | Questions about zlib should be sent to <zlib@gzip.org>, or to Gilles Vollant | 22 | Questions about zlib should be sent to <zlib@gzip.org>, or to Gilles Vollant |
diff --git a/contrib/delphi/zlibd32.mak b/contrib/delphi/zlibd32.mak index 0d0699a..9bb00b7 100644 --- a/contrib/delphi/zlibd32.mak +++ b/contrib/delphi/zlibd32.mak | |||
@@ -63,9 +63,9 @@ uncompr.obj: uncompr.c zlib.h zconf.h | |||
63 | 63 | ||
64 | zutil.obj: zutil.c zutil.h zlib.h zconf.h | 64 | zutil.obj: zutil.c zutil.h zlib.h zconf.h |
65 | 65 | ||
66 | example.obj: example.c zlib.h zconf.h | 66 | example.obj: test/example.c zlib.h zconf.h |
67 | 67 | ||
68 | minigzip.obj: minigzip.c zlib.h zconf.h | 68 | minigzip.obj: test/minigzip.c zlib.h zconf.h |
69 | 69 | ||
70 | 70 | ||
71 | # For the sake of the old Borland make, | 71 | # For the sake of the old Borland make, |
diff --git a/contrib/pascal/zlibd32.mak b/contrib/pascal/zlibd32.mak index 0d0699a..9bb00b7 100644 --- a/contrib/pascal/zlibd32.mak +++ b/contrib/pascal/zlibd32.mak | |||
@@ -63,9 +63,9 @@ uncompr.obj: uncompr.c zlib.h zconf.h | |||
63 | 63 | ||
64 | zutil.obj: zutil.c zutil.h zlib.h zconf.h | 64 | zutil.obj: zutil.c zutil.h zlib.h zconf.h |
65 | 65 | ||
66 | example.obj: example.c zlib.h zconf.h | 66 | example.obj: test/example.c zlib.h zconf.h |
67 | 67 | ||
68 | minigzip.obj: minigzip.c zlib.h zconf.h | 68 | minigzip.obj: test/minigzip.c zlib.h zconf.h |
69 | 69 | ||
70 | 70 | ||
71 | # For the sake of the old Borland make, | 71 | # For the sake of the old Borland make, |
diff --git a/examples/README.examples b/examples/README.examples index fddb8df..56a3171 100644 --- a/examples/README.examples +++ b/examples/README.examples | |||
@@ -6,10 +6,6 @@ enough.c | |||
6 | - calculates the maximum table space used in inflate tree | 6 | - calculates the maximum table space used in inflate tree |
7 | construction over all possible Huffman codes | 7 | construction over all possible Huffman codes |
8 | 8 | ||
9 | example.c | ||
10 | usage examples of zlib | ||
11 | - used in zlib build Makefile for testing | ||
12 | |||
13 | fitblk.c | 9 | fitblk.c |
14 | compress just enough input to nearly fill a requested output size | 10 | compress just enough input to nearly fill a requested output size |
15 | - zlib isn't designed to do this, but fitblk does it anyway | 11 | - zlib isn't designed to do this, but fitblk does it anyway |
@@ -38,11 +34,6 @@ gzlog.h | |||
38 | and deflateSetDictionary() | 34 | and deflateSetDictionary() |
39 | - illustrates use of a gzip header extra field | 35 | - illustrates use of a gzip header extra field |
40 | 36 | ||
41 | minigzip.c | ||
42 | minimal implementation of gzip-like functionality using zlib | ||
43 | - used in zlib build Makefile for testing | ||
44 | - is not meant for and should not be used as a gzip replacement | ||
45 | |||
46 | zlib_how.html | 37 | zlib_how.html |
47 | painfully comprehensive description of zpipe.c (see below) | 38 | painfully comprehensive description of zpipe.c (see below) |
48 | - describes in excruciating detail the use of deflate() and inflate() | 39 | - describes in excruciating detail the use of deflate() and inflate() |
diff --git a/make_vms.com b/make_vms.com index 6576490..11be527 100644 --- a/make_vms.com +++ b/make_vms.com | |||
@@ -175,13 +175,13 @@ $ write sys$output "Building Zlib ..." | |||
175 | $ CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ | 175 | $ CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ |
176 | $ write sys$output "Building example..." | 176 | $ write sys$output "Building example..." |
177 | $ CALL MAKE example.OBJ "CC ''CCOPT' example" - | 177 | $ CALL MAKE example.OBJ "CC ''CCOPT' example" - |
178 | example.c zlib.h zconf.h | 178 | test/example.c zlib.h zconf.h |
179 | $ call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb | 179 | $ call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb |
180 | $ if f$search("x11vms:xvmsutils.olb") .nes. "" | 180 | $ if f$search("x11vms:xvmsutils.olb") .nes. "" |
181 | $ then | 181 | $ then |
182 | $ write sys$output "Building minigzip..." | 182 | $ write sys$output "Building minigzip..." |
183 | $ CALL MAKE minigzip.OBJ "CC ''CCOPT' minigzip" - | 183 | $ CALL MAKE minigzip.OBJ "CC ''CCOPT' minigzip" - |
184 | minigzip.c zlib.h zconf.h | 184 | test/minigzip.c zlib.h zconf.h |
185 | $ call make minigzip.exe - | 185 | $ call make minigzip.exe - |
186 | "LINK minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib" - | 186 | "LINK minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib" - |
187 | minigzip.obj libz.olb | 187 | minigzip.obj libz.olb |
@@ -431,7 +431,7 @@ adler32.obj : adler32.c zutil.h zlib.h zconf.h | |||
431 | compress.obj : compress.c zlib.h zconf.h | 431 | compress.obj : compress.c zlib.h zconf.h |
432 | crc32.obj : crc32.c zutil.h zlib.h zconf.h | 432 | crc32.obj : crc32.c zutil.h zlib.h zconf.h |
433 | deflate.obj : deflate.c deflate.h zutil.h zlib.h zconf.h | 433 | deflate.obj : deflate.c deflate.h zutil.h zlib.h zconf.h |
434 | example.obj : example.c zlib.h zconf.h | 434 | example.obj : test/example.c zlib.h zconf.h |
435 | gzclose.obj : gzclose.c zutil.h zlib.h zconf.h | 435 | gzclose.obj : gzclose.c zutil.h zlib.h zconf.h |
436 | gzlib.obj : gzlib.c zutil.h zlib.h zconf.h | 436 | gzlib.obj : gzlib.c zutil.h zlib.h zconf.h |
437 | gzread.obj : gzread.c zutil.h zlib.h zconf.h | 437 | gzread.obj : gzread.c zutil.h zlib.h zconf.h |
@@ -439,7 +439,7 @@ gzwrite.obj : gzwrite.c zutil.h zlib.h zconf.h | |||
439 | inffast.obj : inffast.c zutil.h zlib.h zconf.h inftrees.h inffast.h | 439 | inffast.obj : inffast.c zutil.h zlib.h zconf.h inftrees.h inffast.h |
440 | inflate.obj : inflate.c zutil.h zlib.h zconf.h | 440 | inflate.obj : inflate.c zutil.h zlib.h zconf.h |
441 | inftrees.obj : inftrees.c zutil.h zlib.h zconf.h inftrees.h | 441 | inftrees.obj : inftrees.c zutil.h zlib.h zconf.h inftrees.h |
442 | minigzip.obj : minigzip.c zlib.h zconf.h | 442 | minigzip.obj : test/minigzip.c zlib.h zconf.h |
443 | trees.obj : trees.c deflate.h zutil.h zlib.h zconf.h | 443 | trees.obj : trees.c deflate.h zutil.h zlib.h zconf.h |
444 | uncompr.obj : uncompr.c zlib.h zconf.h | 444 | uncompr.obj : uncompr.c zlib.h zconf.h |
445 | zutil.obj : zutil.c zutil.h zlib.h zconf.h | 445 | zutil.obj : zutil.c zutil.h zlib.h zconf.h |
diff --git a/msdos/Makefile.bor b/msdos/Makefile.bor index 0c1b99c..3d12a2c 100644 --- a/msdos/Makefile.bor +++ b/msdos/Makefile.bor | |||
@@ -86,9 +86,9 @@ uncompr.obj: uncompr.c zlib.h zconf.h | |||
86 | 86 | ||
87 | zutil.obj: zutil.c zutil.h zlib.h zconf.h | 87 | zutil.obj: zutil.c zutil.h zlib.h zconf.h |
88 | 88 | ||
89 | example.obj: example.c zlib.h zconf.h | 89 | example.obj: test/example.c zlib.h zconf.h |
90 | 90 | ||
91 | minigzip.obj: minigzip.c zlib.h zconf.h | 91 | minigzip.obj: test/minigzip.c zlib.h zconf.h |
92 | 92 | ||
93 | 93 | ||
94 | # the command line is cut to fit in the MS-DOS 128 byte limit: | 94 | # the command line is cut to fit in the MS-DOS 128 byte limit: |
diff --git a/msdos/Makefile.msc b/msdos/Makefile.msc index cd2816f..ae83786 100644 --- a/msdos/Makefile.msc +++ b/msdos/Makefile.msc | |||
@@ -80,10 +80,10 @@ uncompr.obj: uncompr.c zlib.h zconf.h | |||
80 | 80 | ||
81 | zutil.obj: zutil.c zutil.h zlib.h zconf.h | 81 | zutil.obj: zutil.c zutil.h zlib.h zconf.h |
82 | 82 | ||
83 | example.obj: example.c zlib.h zconf.h | 83 | example.obj: test/example.c zlib.h zconf.h |
84 | $(CC) -c $(CFLAGS) $*.c | 84 | $(CC) -c $(CFLAGS) $*.c |
85 | 85 | ||
86 | minigzip.obj: minigzip.c zlib.h zconf.h | 86 | minigzip.obj: test/minigzip.c zlib.h zconf.h |
87 | $(CC) -c $(CFLAGS) $*.c | 87 | $(CC) -c $(CFLAGS) $*.c |
88 | 88 | ||
89 | 89 | ||
diff --git a/msdos/Makefile.tc b/msdos/Makefile.tc index bcd0d18..5aec82a 100644 --- a/msdos/Makefile.tc +++ b/msdos/Makefile.tc | |||
@@ -71,9 +71,9 @@ uncompr.obj: uncompr.c zlib.h zconf.h | |||
71 | 71 | ||
72 | zutil.obj: zutil.c zutil.h zlib.h zconf.h | 72 | zutil.obj: zutil.c zutil.h zlib.h zconf.h |
73 | 73 | ||
74 | example.obj: example.c zlib.h zconf.h | 74 | example.obj: test/example.c zlib.h zconf.h |
75 | 75 | ||
76 | minigzip.obj: minigzip.c zlib.h zconf.h | 76 | minigzip.obj: test/minigzip.c zlib.h zconf.h |
77 | 77 | ||
78 | 78 | ||
79 | # the command line is cut to fit in the MS-DOS 128 byte limit: | 79 | # the command line is cut to fit in the MS-DOS 128 byte limit: |
diff --git a/old/visualc6/example.dsp b/old/visualc6/example.dsp index d358052..54f3f30 100644 --- a/old/visualc6/example.dsp +++ b/old/visualc6/example.dsp | |||
@@ -259,7 +259,7 @@ LINK32=link.exe | |||
259 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" | 259 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" |
260 | # Begin Source File | 260 | # Begin Source File |
261 | 261 | ||
262 | SOURCE=..\..\example.c | 262 | SOURCE=..\..\test\example.c |
263 | # End Source File | 263 | # End Source File |
264 | # End Group | 264 | # End Group |
265 | # Begin Group "Header Files" | 265 | # Begin Group "Header Files" |
diff --git a/examples/example.c b/test/example.c index f515a48..f515a48 100644 --- a/examples/example.c +++ b/test/example.c | |||
diff --git a/examples/minigzip.c b/test/minigzip.c index 8317344..8317344 100644 --- a/examples/minigzip.c +++ b/test/minigzip.c | |||
diff --git a/win32/Makefile.bor b/win32/Makefile.bor index 3981d42..d152bbb 100644 --- a/win32/Makefile.bor +++ b/win32/Makefile.bor | |||
@@ -74,9 +74,9 @@ uncompr.obj: uncompr.c zlib.h zconf.h | |||
74 | 74 | ||
75 | zutil.obj: zutil.c zutil.h zlib.h zconf.h | 75 | zutil.obj: zutil.c zutil.h zlib.h zconf.h |
76 | 76 | ||
77 | example.obj: example.c zlib.h zconf.h | 77 | example.obj: test/example.c zlib.h zconf.h |
78 | 78 | ||
79 | minigzip.obj: minigzip.c zlib.h zconf.h | 79 | minigzip.obj: test/minigzip.c zlib.h zconf.h |
80 | 80 | ||
81 | 81 | ||
82 | # For the sake of the old Borland make, | 82 | # For the sake of the old Borland make, |
diff --git a/win32/Makefile.msc b/win32/Makefile.msc index 2714b45..53e66ca 100644 --- a/win32/Makefile.msc +++ b/win32/Makefile.msc | |||
@@ -125,9 +125,9 @@ inffas32.obj: contrib\masmx86\inffas32.asm | |||
125 | 125 | ||
126 | match686.obj: contrib\masmx86\match686.asm | 126 | match686.obj: contrib\masmx86\match686.asm |
127 | 127 | ||
128 | example.obj: example.c zlib.h zconf.h | 128 | example.obj: test/example.c zlib.h zconf.h |
129 | 129 | ||
130 | minigzip.obj: minigzip.c zlib.h zconf.h | 130 | minigzip.obj: test/minigzip.c zlib.h zconf.h |
131 | 131 | ||
132 | zlib1.res: win32/zlib1.rc | 132 | zlib1.res: win32/zlib1.rc |
133 | $(RC) $(RCFLAGS) /fo$@ win32/zlib1.rc | 133 | $(RC) $(RCFLAGS) /fo$@ win32/zlib1.rc |
@@ -1,4 +1,4 @@ | |||
1 | .TH ZLIB 3 "xx Sep 2011" | 1 | .TH ZLIB 3 "27 Nov 2011" |
2 | .SH NAME | 2 | .SH NAME |
3 | zlib \- compression/decompression library | 3 | zlib \- compression/decompression library |
4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
@@ -36,9 +36,9 @@ All functions of the compression library are documented in the file | |||
36 | .IR zlib.h . | 36 | .IR zlib.h . |
37 | The distribution source includes examples of use of the library | 37 | The distribution source includes examples of use of the library |
38 | in the files | 38 | in the files |
39 | .I example.c | 39 | .I test/example.c |
40 | and | 40 | and |
41 | .IR minigzip.c, | 41 | .IR test/minigzip.c, |
42 | as well as other examples in the | 42 | as well as other examples in the |
43 | .IR examples/ | 43 | .IR examples/ |
44 | directory. | 44 | directory. |
Binary files differ | |||