diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:22:37 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:22:37 -0700 |
commit | 4b5a43a219d51066c01ff2ab86af18b967f2d0dd (patch) | |
tree | 4dcaf0cd18751d04cf638a9a6ec521990d4f2e90 /contrib/infback9 | |
parent | 086e982175da84b3db958191031380794315f95f (diff) | |
download | zlib-1.2.0.5.tar.gz zlib-1.2.0.5.tar.bz2 zlib-1.2.0.5.zip |
zlib 1.2.0.5v1.2.0.5
Diffstat (limited to '')
-rw-r--r-- | contrib/infback9/README | 1 | ||||
-rw-r--r-- | contrib/infback9/infback9.diff | 427 | ||||
-rw-r--r-- | contrib/infback9/infback9.h | 26 | ||||
-rw-r--r-- | contrib/infback9/inffix9.h | 94 |
4 files changed, 548 insertions, 0 deletions
diff --git a/contrib/infback9/README b/contrib/infback9/README new file mode 100644 index 0000000..e75ed13 --- /dev/null +++ b/contrib/infback9/README | |||
@@ -0,0 +1 @@ | |||
See infback9.h for what this is and how to use it. | |||
diff --git a/contrib/infback9/infback9.diff b/contrib/infback9/infback9.diff new file mode 100644 index 0000000..cbe2e49 --- /dev/null +++ b/contrib/infback9/infback9.diff | |||
@@ -0,0 +1,427 @@ | |||
1 | *** infback.c Mon Aug 11 16:48:06 2003 | ||
2 | --- infback9.c Mon Sep 8 21:22:46 2003 | ||
3 | *************** | ||
4 | *** 1,19 **** | ||
5 | ! /* infback.c -- inflate using a call-back interface | ||
6 | * Copyright (C) 1995-2003 Mark Adler | ||
7 | * For conditions of distribution and use, see copyright notice in zlib.h | ||
8 | */ | ||
9 | |||
10 | - /* | ||
11 | - This code is largely copied from inflate.c. Normally either infback.o or | ||
12 | - inflate.o would be linked into an application--not both. The interface | ||
13 | - with inffast.c is retained so that optimized assembler-coded versions of | ||
14 | - inflate_fast() can be used with either inflate.c or infback.c. | ||
15 | - */ | ||
16 | - | ||
17 | #include "zutil.h" | ||
18 | ! #include "inftrees.h" | ||
19 | #include "inflate.h" | ||
20 | - #include "inffast.h" | ||
21 | |||
22 | /* function prototypes */ | ||
23 | local void fixedtables OF((struct inflate_state FAR *state)); | ||
24 | --- 1,12 ---- | ||
25 | ! /* infback9.c -- inflate deflate64 data using a call-back interface | ||
26 | * Copyright (C) 1995-2003 Mark Adler | ||
27 | * For conditions of distribution and use, see copyright notice in zlib.h | ||
28 | */ | ||
29 | |||
30 | #include "zutil.h" | ||
31 | ! #include "infback9.h" | ||
32 | ! #include "inftree9.h" | ||
33 | #include "inflate.h" | ||
34 | |||
35 | /* function prototypes */ | ||
36 | local void fixedtables OF((struct inflate_state FAR *state)); | ||
37 | *************** | ||
38 | *** 22,33 **** | ||
39 | strm provides memory allocation functions in zalloc and zfree, or | ||
40 | Z_NULL to use the library memory allocation functions. | ||
41 | |||
42 | ! windowBits is in the range 8..15, and window is a user-supplied | ||
43 | ! window and output buffer that is 2**windowBits bytes. | ||
44 | */ | ||
45 | ! int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size) | ||
46 | z_stream FAR *strm; | ||
47 | - int windowBits; | ||
48 | unsigned char FAR *window; | ||
49 | const char *version; | ||
50 | int stream_size; | ||
51 | --- 15,24 ---- | ||
52 | strm provides memory allocation functions in zalloc and zfree, or | ||
53 | Z_NULL to use the library memory allocation functions. | ||
54 | |||
55 | ! window is a user-supplied window and output buffer that is 64K bytes. | ||
56 | */ | ||
57 | ! int ZEXPORT inflateBack9Init_(strm, window, version, stream_size) | ||
58 | z_stream FAR *strm; | ||
59 | unsigned char FAR *window; | ||
60 | const char *version; | ||
61 | int stream_size; | ||
62 | *************** | ||
63 | *** 37,44 **** | ||
64 | if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || | ||
65 | stream_size != (int)(sizeof(z_stream))) | ||
66 | return Z_VERSION_ERROR; | ||
67 | ! if (strm == Z_NULL || window == Z_NULL || | ||
68 | ! windowBits < 8 || windowBits > 15) | ||
69 | return Z_STREAM_ERROR; | ||
70 | strm->msg = Z_NULL; /* in case we return an error */ | ||
71 | if (strm->zalloc == (alloc_func)0) { | ||
72 | --- 28,34 ---- | ||
73 | if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || | ||
74 | stream_size != (int)(sizeof(z_stream))) | ||
75 | return Z_VERSION_ERROR; | ||
76 | ! if (strm == Z_NULL || window == Z_NULL) | ||
77 | return Z_STREAM_ERROR; | ||
78 | strm->msg = Z_NULL; /* in case we return an error */ | ||
79 | if (strm->zalloc == (alloc_func)0) { | ||
80 | *************** | ||
81 | *** 51,58 **** | ||
82 | if (state == Z_NULL) return Z_MEM_ERROR; | ||
83 | Tracev((stderr, "inflate: allocated\n")); | ||
84 | strm->state = (voidpf)state; | ||
85 | ! state->wbits = windowBits; | ||
86 | ! state->wsize = 1U << windowBits; | ||
87 | state->window = window; | ||
88 | state->write = 0; | ||
89 | state->whave = 0; | ||
90 | --- 41,48 ---- | ||
91 | if (state == Z_NULL) return Z_MEM_ERROR; | ||
92 | Tracev((stderr, "inflate: allocated\n")); | ||
93 | strm->state = (voidpf)state; | ||
94 | ! state->wbits = 16; | ||
95 | ! state->wsize = 1U << 16; | ||
96 | state->window = window; | ||
97 | state->write = 0; | ||
98 | state->whave = 0; | ||
99 | *************** | ||
100 | *** 91,110 **** | ||
101 | next = fixed; | ||
102 | lenfix = next; | ||
103 | bits = 9; | ||
104 | ! inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work); | ||
105 | |||
106 | /* distance table */ | ||
107 | sym = 0; | ||
108 | while (sym < 32) state->lens[sym++] = 5; | ||
109 | distfix = next; | ||
110 | bits = 5; | ||
111 | ! inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work); | ||
112 | |||
113 | /* do this just once */ | ||
114 | virgin = 0; | ||
115 | } | ||
116 | #else /* !BUILDFIXED */ | ||
117 | ! # include "inffixed.h" | ||
118 | #endif /* BUILDFIXED */ | ||
119 | state->lencode = lenfix; | ||
120 | state->lenbits = 9; | ||
121 | --- 81,100 ---- | ||
122 | next = fixed; | ||
123 | lenfix = next; | ||
124 | bits = 9; | ||
125 | ! inflate_table9(LENS, state->lens, 288, &(next), &(bits), state->work); | ||
126 | |||
127 | /* distance table */ | ||
128 | sym = 0; | ||
129 | while (sym < 32) state->lens[sym++] = 5; | ||
130 | distfix = next; | ||
131 | bits = 5; | ||
132 | ! inflate_table9(DISTS, state->lens, 32, &(next), &(bits), state->work); | ||
133 | |||
134 | /* do this just once */ | ||
135 | virgin = 0; | ||
136 | } | ||
137 | #else /* !BUILDFIXED */ | ||
138 | ! # include "inffix9.h" | ||
139 | #endif /* BUILDFIXED */ | ||
140 | state->lencode = lenfix; | ||
141 | state->lenbits = 9; | ||
142 | *************** | ||
143 | *** 114,141 **** | ||
144 | |||
145 | /* Macros for inflateBack(): */ | ||
146 | |||
147 | - /* Load returned state from inflate_fast() */ | ||
148 | - #define LOAD() \ | ||
149 | - do { \ | ||
150 | - put = strm->next_out; \ | ||
151 | - left = strm->avail_out; \ | ||
152 | - next = strm->next_in; \ | ||
153 | - have = strm->avail_in; \ | ||
154 | - hold = state->hold; \ | ||
155 | - bits = state->bits; \ | ||
156 | - } while (0) | ||
157 | - | ||
158 | - /* Set state from registers for inflate_fast() */ | ||
159 | - #define RESTORE() \ | ||
160 | - do { \ | ||
161 | - strm->next_out = put; \ | ||
162 | - strm->avail_out = left; \ | ||
163 | - strm->next_in = next; \ | ||
164 | - strm->avail_in = have; \ | ||
165 | - state->hold = hold; \ | ||
166 | - state->bits = bits; \ | ||
167 | - } while (0) | ||
168 | - | ||
169 | /* Clear the input bit accumulator */ | ||
170 | #define INITBITS() \ | ||
171 | do { \ | ||
172 | --- 104,109 ---- | ||
173 | *************** | ||
174 | *** 237,243 **** | ||
175 | inflateBack() can also return Z_STREAM_ERROR if the input parameters | ||
176 | are not correct, i.e. strm is Z_NULL or the state was not initialized. | ||
177 | */ | ||
178 | ! int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc) | ||
179 | z_stream FAR *strm; | ||
180 | in_func in; | ||
181 | void FAR *in_desc; | ||
182 | --- 205,211 ---- | ||
183 | inflateBack() can also return Z_STREAM_ERROR if the input parameters | ||
184 | are not correct, i.e. strm is Z_NULL or the state was not initialized. | ||
185 | */ | ||
186 | ! int ZEXPORT inflateBack9(strm, in, in_desc, out, out_desc) | ||
187 | z_stream FAR *strm; | ||
188 | in_func in; | ||
189 | void FAR *in_desc; | ||
190 | *************** | ||
191 | *** 354,366 **** | ||
192 | DROPBITS(5); | ||
193 | state->ncode = BITS(4) + 4; | ||
194 | DROPBITS(4); | ||
195 | ! #ifndef PKZIP_BUG_WORKAROUND | ||
196 | ! if (state->nlen > 286 || state->ndist > 30) { | ||
197 | ! strm->msg = (char *)"too many length or distance symbols"; | ||
198 | state->mode = BAD; | ||
199 | break; | ||
200 | } | ||
201 | - #endif | ||
202 | Tracev((stderr, "inflate: table sizes ok\n")); | ||
203 | |||
204 | /* get code length code lengths (not a typo) */ | ||
205 | --- 322,332 ---- | ||
206 | DROPBITS(5); | ||
207 | state->ncode = BITS(4) + 4; | ||
208 | DROPBITS(4); | ||
209 | ! if (state->nlen > 286) { | ||
210 | ! strm->msg = (char *)"too many length symbols"; | ||
211 | state->mode = BAD; | ||
212 | break; | ||
213 | } | ||
214 | Tracev((stderr, "inflate: table sizes ok\n")); | ||
215 | |||
216 | /* get code length code lengths (not a typo) */ | ||
217 | *************** | ||
218 | *** 375,381 **** | ||
219 | state->next = state->codes; | ||
220 | state->lencode = (code const FAR *)(state->next); | ||
221 | state->lenbits = 7; | ||
222 | ! ret = inflate_table(CODES, state->lens, 19, &(state->next), | ||
223 | &(state->lenbits), state->work); | ||
224 | if (ret) { | ||
225 | strm->msg = (char *)"invalid code lengths set"; | ||
226 | --- 341,347 ---- | ||
227 | state->next = state->codes; | ||
228 | state->lencode = (code const FAR *)(state->next); | ||
229 | state->lenbits = 7; | ||
230 | ! ret = inflate_table9(CODES, state->lens, 19, &(state->next), | ||
231 | &(state->lenbits), state->work); | ||
232 | if (ret) { | ||
233 | strm->msg = (char *)"invalid code lengths set"; | ||
234 | *************** | ||
235 | *** 438,445 **** | ||
236 | state->next = state->codes; | ||
237 | state->lencode = (code const FAR *)(state->next); | ||
238 | state->lenbits = 9; | ||
239 | ! ret = inflate_table(LENS, state->lens, state->nlen, &(state->next), | ||
240 | ! &(state->lenbits), state->work); | ||
241 | if (ret) { | ||
242 | strm->msg = (char *)"invalid literal/lengths set"; | ||
243 | state->mode = BAD; | ||
244 | --- 404,411 ---- | ||
245 | state->next = state->codes; | ||
246 | state->lencode = (code const FAR *)(state->next); | ||
247 | state->lenbits = 9; | ||
248 | ! ret = inflate_table9(LENS, state->lens, state->nlen, | ||
249 | ! &(state->next), &(state->lenbits), state->work); | ||
250 | if (ret) { | ||
251 | strm->msg = (char *)"invalid literal/lengths set"; | ||
252 | state->mode = BAD; | ||
253 | *************** | ||
254 | *** 447,454 **** | ||
255 | } | ||
256 | state->distcode = (code const FAR *)(state->next); | ||
257 | state->distbits = 6; | ||
258 | ! ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist, | ||
259 | ! &(state->next), &(state->distbits), state->work); | ||
260 | if (ret) { | ||
261 | strm->msg = (char *)"invalid distances set"; | ||
262 | state->mode = BAD; | ||
263 | --- 413,421 ---- | ||
264 | } | ||
265 | state->distcode = (code const FAR *)(state->next); | ||
266 | state->distbits = 6; | ||
267 | ! ret = inflate_table9(DISTS, state->lens + state->nlen, | ||
268 | ! state->ndist, &(state->next), &(state->distbits), | ||
269 | ! state->work); | ||
270 | if (ret) { | ||
271 | strm->msg = (char *)"invalid distances set"; | ||
272 | state->mode = BAD; | ||
273 | *************** | ||
274 | *** 458,473 **** | ||
275 | state->mode = LEN; | ||
276 | |||
277 | case LEN: | ||
278 | - /* use inflate_fast() if we have enough input and output */ | ||
279 | - if (have >= 6 && left >= 258) { | ||
280 | - RESTORE(); | ||
281 | - if (state->whave < state->wsize) | ||
282 | - state->whave = state->wsize - left; | ||
283 | - inflate_fast(strm, state->wsize); | ||
284 | - LOAD(); | ||
285 | - break; | ||
286 | - } | ||
287 | - | ||
288 | /* get a literal, length, or end-of-block code */ | ||
289 | for (;;) { | ||
290 | this = state->lencode[BITS(state->lenbits)]; | ||
291 | --- 425,430 ---- | ||
292 | *************** | ||
293 | *** 607,613 **** | ||
294 | return ret; | ||
295 | } | ||
296 | |||
297 | ! int ZEXPORT inflateBackEnd(strm) | ||
298 | z_stream FAR *strm; | ||
299 | { | ||
300 | if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) | ||
301 | --- 564,570 ---- | ||
302 | return ret; | ||
303 | } | ||
304 | |||
305 | ! int ZEXPORT inflateBack9End(strm) | ||
306 | z_stream FAR *strm; | ||
307 | { | ||
308 | if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) | ||
309 | *** inftrees.c Sun Sep 7 10:59:10 2003 | ||
310 | --- inftree9.c Mon Sep 8 20:54:36 2003 | ||
311 | *************** | ||
312 | *** 1,15 **** | ||
313 | ! /* inftrees.c -- generate Huffman trees for efficient decoding | ||
314 | * Copyright (C) 1995-2003 Mark Adler | ||
315 | * For conditions of distribution and use, see copyright notice in zlib.h | ||
316 | */ | ||
317 | |||
318 | #include "zutil.h" | ||
319 | ! #include "inftrees.h" | ||
320 | |||
321 | #define MAXBITS 15 | ||
322 | |||
323 | ! const char inflate_copyright[] = | ||
324 | ! " inflate 1.2.0.5 Copyright 1995-2003 Mark Adler "; | ||
325 | /* | ||
326 | If you use the zlib library in a product, an acknowledgment is welcome | ||
327 | in the documentation of your product. If for some reason you cannot | ||
328 | --- 1,15 ---- | ||
329 | ! /* inftree9.c -- generate Huffman trees for efficient decoding | ||
330 | * Copyright (C) 1995-2003 Mark Adler | ||
331 | * For conditions of distribution and use, see copyright notice in zlib.h | ||
332 | */ | ||
333 | |||
334 | #include "zutil.h" | ||
335 | ! #include "inftree9.h" | ||
336 | |||
337 | #define MAXBITS 15 | ||
338 | |||
339 | ! const char inflate9_copyright[] = | ||
340 | ! " inflate9 1.2.0.5 Copyright 1995-2003 Mark Adler "; | ||
341 | /* | ||
342 | If you use the zlib library in a product, an acknowledgment is welcome | ||
343 | in the documentation of your product. If for some reason you cannot | ||
344 | *************** | ||
345 | *** 29,35 **** | ||
346 | table index bits. It will differ if the request is greater than the | ||
347 | longest code or if it is less than the shortest code. | ||
348 | */ | ||
349 | ! int inflate_table(type, lens, codes, table, bits, work) | ||
350 | codetype type; | ||
351 | unsigned short FAR *lens; | ||
352 | unsigned codes; | ||
353 | --- 29,35 ---- | ||
354 | table index bits. It will differ if the request is greater than the | ||
355 | longest code or if it is less than the shortest code. | ||
356 | */ | ||
357 | ! int inflate_table9(type, lens, codes, table, bits, work) | ||
358 | codetype type; | ||
359 | unsigned short FAR *lens; | ||
360 | unsigned codes; | ||
361 | *************** | ||
362 | *** 59,76 **** | ||
363 | unsigned short offs[MAXBITS+1]; /* offsets in table for each length */ | ||
364 | static const unsigned short lbase[31] = { /* Length codes 257..285 base */ | ||
365 | 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, | ||
366 | ! 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; | ||
367 | static const unsigned short lext[31] = { /* Length codes 257..285 extra */ | ||
368 | 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, | ||
369 | ! 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 192, 78}; | ||
370 | ! static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ | ||
371 | 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, | ||
372 | 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, | ||
373 | ! 8193, 12289, 16385, 24577, 0, 0}; | ||
374 | ! static const unsigned short dext[32] = { /* Distance codes 0..29 extra */ | ||
375 | 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, | ||
376 | 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, | ||
377 | ! 28, 28, 29, 29, 64, 64}; | ||
378 | |||
379 | /* | ||
380 | Process a set of code lengths to create a canonical Huffman code. The | ||
381 | --- 59,76 ---- | ||
382 | unsigned short offs[MAXBITS+1]; /* offsets in table for each length */ | ||
383 | static const unsigned short lbase[31] = { /* Length codes 257..285 base */ | ||
384 | 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, | ||
385 | ! 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 3, 0, 0}; | ||
386 | static const unsigned short lext[31] = { /* Length codes 257..285 extra */ | ||
387 | 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, | ||
388 | ! 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 32, 192, 78}; | ||
389 | ! static const unsigned short dbase[32] = { /* Distance codes 0..31 base */ | ||
390 | 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, | ||
391 | 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, | ||
392 | ! 8193, 12289, 16385, 24577, 32769, 49153}; | ||
393 | ! static const unsigned short dext[32] = { /* Distance codes 0..31 extra */ | ||
394 | 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, | ||
395 | 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, | ||
396 | ! 28, 28, 29, 29, 30, 30}; | ||
397 | |||
398 | /* | ||
399 | Process a set of code lengths to create a canonical Huffman code. The | ||
400 | *** inftrees.h Sun Aug 10 15:15:50 2003 | ||
401 | --- inftree9.h Mon Sep 8 20:54:51 2003 | ||
402 | *************** | ||
403 | *** 1,4 **** | ||
404 | ! /* inftrees.h -- header to use inftrees.c | ||
405 | * Copyright (C) 1995-2003 Mark Adler | ||
406 | * For conditions of distribution and use, see copyright notice in zlib.h | ||
407 | */ | ||
408 | --- 1,4 ---- | ||
409 | ! /* inftree9.h -- header to use inftree9.c | ||
410 | * Copyright (C) 1995-2003 Mark Adler | ||
411 | * For conditions of distribution and use, see copyright notice in zlib.h | ||
412 | */ | ||
413 | *************** | ||
414 | *** 50,55 **** | ||
415 | DISTS | ||
416 | } codetype; | ||
417 | |||
418 | ! extern int inflate_table OF((codetype type, unsigned short FAR *lens, | ||
419 | unsigned codes, code FAR * FAR *table, | ||
420 | unsigned FAR *bits, unsigned short FAR *work)); | ||
421 | --- 50,55 ---- | ||
422 | DISTS | ||
423 | } codetype; | ||
424 | |||
425 | ! extern int inflate_table9 OF((codetype type, unsigned short FAR *lens, | ||
426 | unsigned codes, code FAR * FAR *table, | ||
427 | unsigned FAR *bits, unsigned short FAR *work)); | ||
diff --git a/contrib/infback9/infback9.h b/contrib/infback9/infback9.h new file mode 100644 index 0000000..fb7c73e --- /dev/null +++ b/contrib/infback9/infback9.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* infback9.h -- header for using inflateBack9 functions | ||
2 | * Copyright (C) 2003 Mark Adler | ||
3 | * For conditions of distribution and use, see copyright notice in zlib.h | ||
4 | */ | ||
5 | |||
6 | /* | ||
7 | * This header file and associated patches provide a decoder for PKWare's | ||
8 | * undocumented deflate64 compression method (method 9). Use with infback9.c, | ||
9 | * inftree9.h, inftree9.c, and inffix9.h. These patches are not supported. | ||
10 | * This code will almost certainly not work on 16-bit architectures. See the | ||
11 | * comments in zlib.h for inflateBack() usage. These functions are used | ||
12 | * identically, except that there is no windowBits parameter, and a 64K | ||
13 | * window must be provided. zlib.h must be included before this header file. | ||
14 | */ | ||
15 | |||
16 | ZEXTERN int ZEXPORT inflateBack9 OF((z_stream FAR *strm, | ||
17 | in_func in, void FAR *in_desc, | ||
18 | out_func out, void FAR *out_desc)); | ||
19 | ZEXTERN int ZEXPORT inflateBack9End OF((z_stream FAR *strm)); | ||
20 | ZEXTERN int ZEXPORT inflateBack9Init_ OF((z_stream FAR *strm, | ||
21 | unsigned char FAR *window, | ||
22 | const char *version, | ||
23 | int stream_size)); | ||
24 | #define inflateBack9Init(strm, window) \ | ||
25 | inflateBack9Init_((strm), (window), \ | ||
26 | ZLIB_VERSION, sizeof(z_stream)) | ||
diff --git a/contrib/infback9/inffix9.h b/contrib/infback9/inffix9.h new file mode 100644 index 0000000..8476588 --- /dev/null +++ b/contrib/infback9/inffix9.h | |||
@@ -0,0 +1,94 @@ | |||
1 | /* inffix9.h -- table for decoding fixed codes | ||
2 | * Generated automatically by makefixed(). | ||
3 | */ | ||
4 | |||
5 | /* WARNING: this file should *not* be used by applications. | ||
6 | It is part of the implementation of this library and is | ||
7 | subject to change. Applications should only use zlib.h. | ||
8 | */ | ||
9 | |||
10 | static const code lenfix[512] = { | ||
11 | {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48}, | ||
12 | {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128}, | ||
13 | {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59}, | ||
14 | {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176}, | ||
15 | {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20}, | ||
16 | {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100}, | ||
17 | {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8}, | ||
18 | {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216}, | ||
19 | {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76}, | ||
20 | {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114}, | ||
21 | {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2}, | ||
22 | {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148}, | ||
23 | {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42}, | ||
24 | {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86}, | ||
25 | {0,8,22},{192,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15}, | ||
26 | {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236}, | ||
27 | {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62}, | ||
28 | {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142}, | ||
29 | {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31}, | ||
30 | {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162}, | ||
31 | {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25}, | ||
32 | {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105}, | ||
33 | {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4}, | ||
34 | {0,8,85},{0,8,21},{32,8,3},{19,7,43},{0,8,117},{0,8,53},{0,9,202}, | ||
35 | {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69}, | ||
36 | {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125}, | ||
37 | {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13}, | ||
38 | {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195}, | ||
39 | {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35}, | ||
40 | {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91}, | ||
41 | {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19}, | ||
42 | {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246}, | ||
43 | {16,7,5},{0,8,87},{0,8,23},{78,8,0},{19,7,51},{0,8,119},{0,8,55}, | ||
44 | {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135}, | ||
45 | {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99}, | ||
46 | {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190}, | ||
47 | {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16}, | ||
48 | {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96}, | ||
49 | {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6}, | ||
50 | {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209}, | ||
51 | {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72}, | ||
52 | {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116}, | ||
53 | {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4}, | ||
54 | {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153}, | ||
55 | {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44}, | ||
56 | {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82}, | ||
57 | {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11}, | ||
58 | {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229}, | ||
59 | {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58}, | ||
60 | {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138}, | ||
61 | {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{192,8,0},{19,7,51}, | ||
62 | {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173}, | ||
63 | {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30}, | ||
64 | {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110}, | ||
65 | {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0}, | ||
66 | {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195}, | ||
67 | {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65}, | ||
68 | {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121}, | ||
69 | {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9}, | ||
70 | {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{32,8,3}, | ||
71 | {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37}, | ||
72 | {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93}, | ||
73 | {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23}, | ||
74 | {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251}, | ||
75 | {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51}, | ||
76 | {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131}, | ||
77 | {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67}, | ||
78 | {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183}, | ||
79 | {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23}, | ||
80 | {78,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103}, | ||
81 | {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9}, | ||
82 | {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223}, | ||
83 | {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79}, | ||
84 | {0,9,255} | ||
85 | }; | ||
86 | |||
87 | static const code distfix[32] = { | ||
88 | {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025}, | ||
89 | {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193}, | ||
90 | {18,5,9},{26,5,2049},{22,5,129},{30,5,32769},{16,5,2},{23,5,385}, | ||
91 | {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577}, | ||
92 | {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073}, | ||
93 | {22,5,193},{30,5,49153} | ||
94 | }; | ||