28 stream_size != (
int)(
sizeof(
z_stream)))
33 if (
strm->zalloc == (alloc_func)0) {
41 Tracev((stderr,
"inflate: allocated\n"));
63 while (sym < 144)
state.lens[sym++] = 8;
64 while (sym < 256)
state.lens[sym++] = 9;
65 while (sym < 280)
state.lens[sym++] = 7;
66 while (sym < 288)
state.lens[sym++] = 8;
74 while (sym < 32)
state.lens[sym++] = 5;
80 puts(
" /* inffix9.h -- table for decoding deflate64 fixed codes");
81 puts(
" * Generated automatically by makefixed9().");
84 puts(
" /* WARNING: this file should *not* be used by applications.");
85 puts(
" It is part of the implementation of this library and is");
86 puts(
" subject to change. Applications should only use zlib.h.");
90 printf(
" static const code lenfix[%u] = {",
size);
93 if ((low % 6) == 0)
printf(
"\n ");
96 if (++low ==
size)
break;
101 printf(
"\n static const code distfix[%u] = {",
size);
104 if ((low % 5) == 0)
printf(
"\n ");
107 if (++low ==
size)
break;
128 have = in(in_desc, &next); \
143 hold += (unsigned long)(*next++) << bits; \
150 #define NEEDBITS(n) \
152 while (bits < (unsigned)(n)) \
158 ((unsigned)hold & ((1U << (n)) - 1))
161 #define DROPBITS(n) \
164 bits -= (unsigned)(n); \
183 if (out(out_desc, put, (unsigned)left)) { \
226 unsigned char FAR *put;
248 static const unsigned short order[19] =
249 {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
287 Tracev((stderr,
"inflate: stored block%s\n",
288 lastblock ?
" (last)" :
""));
296 Tracev((stderr,
"inflate: fixed codes block%s\n",
297 lastblock ?
" (last)" :
""));
301 Tracev((stderr,
"inflate: dynamic codes block%s\n",
302 lastblock ?
" (last)" :
""));
306 strm->msg = (
char *)
"invalid block type";
316 if ((
hold & 0xffff) != ((
hold >> 16) ^ 0xffff)) {
317 strm->msg = (
char *)
"invalid stored block lengths";
322 Tracev((stderr,
"inflate: stored length %lu\n",
332 if (copy > left) copy = left;
340 Tracev((stderr,
"inflate: stored end\n"));
353 if (
state->nlen > 286) {
354 strm->msg = (
char *)
"too many length symbols";
358 Tracev((stderr,
"inflate: table sizes ok\n"));
367 while (
state->have < 19)
375 strm->msg = (
char *)
"invalid code lengths set";
379 Tracev((stderr,
"inflate: code lengths ok\n"));
386 if ((
unsigned)(here.
bits) <=
bits)
break;
395 if (here.
val == 16) {
398 if (
state->have == 0) {
399 strm->msg = (
char *)
"invalid bit length repeat";
407 else if (here.
val == 17) {
422 strm->msg = (
char *)
"invalid bit length repeat";
435 if (
state->lens[256] == 0) {
436 strm->msg = (
char *)
"invalid code -- missing end-of-block";
450 strm->msg = (
char *)
"invalid literal/lengths set";
460 strm->msg = (
char *)
"invalid distances set";
464 Tracev((stderr,
"inflate: codes ok\n"));
471 if ((
unsigned)(here.
bits) <=
bits)
break;
474 if (here.
op && (here.
op & 0xf0) == 0) {
490 "inflate: literal '%c'\n" :
491 "inflate: literal 0x%02x\n", here.
val));
493 *put++ = (
unsigned char)(
length);
501 Tracevv((stderr,
"inflate: end of block\n"));
508 strm->msg = (
char *)
"invalid literal/length code";
525 if ((
unsigned)(here.
bits) <=
bits)
break;
528 if ((here.
op & 0xf0) == 0) {
540 strm->msg = (
char *)
"invalid distance code";
547 extra = (
unsigned)(here.
op) & 15;
554 strm->msg = (
char *)
"invalid distance too far back";
613 Tracev((stderr,
"inflate: end\n"));
int bits(struct state *s, int need)
const lzma_allocator const uint8_t * in
const lzma_allocator const uint8_t size_t uint8_t * out
_Use_decl_annotations_ int __cdecl printf(const char *const _Format,...)
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void length
int ZEXPORT inflateBack9Init_(z_stream FAR *strm, unsigned char FAR *window, const char *version, int stream_size)
int ZEXPORT inflateBack9(z_stream FAR *strm, in_func in, void FAR *in_desc, out_func out, void FAR *out_desc)
int ZEXPORT inflateBack9End(z_stream FAR *strm)
static const code distfix[32]
static const code lenfix[512]
int inflate_table9(codetype type, unsigned short FAR *lens, unsigned codes, code FAR *FAR *table, unsigned FAR *bits, unsigned short FAR *work)
static void struct sockaddr socklen_t static fromlen static backlog static fork char char char static envp int struct rusage static rusage struct utsname static buf struct sembuf unsigned
int fixed(struct state *s)
static struct sockaddr static addrlen static backlog const void static flags void struct sockaddr from
code const FAR * distcode
if(dbg->bits==RZ_SYS_BITS_64)
void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr)
voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size)
void ZLIB_INTERNAL zmemcpy(Bytef *dest, const Bytef *source, uInt len)
#define ZALLOC(strm, items, size)
#define ZFREE(strm, addr)