Definition at line 250 of file infback.c.
259 unsigned char FAR *put;
269 static const unsigned short order[19] =
270 {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
291 switch (
state->mode) {
304 Tracev((stderr,
"inflate: stored block%s\n",
305 state->last ?
" (last)" :
""));
310 Tracev((stderr,
"inflate: fixed codes block%s\n",
311 state->last ?
" (last)" :
""));
315 Tracev((stderr,
"inflate: dynamic codes block%s\n",
316 state->last ?
" (last)" :
""));
320 strm->msg = (
char *)
"invalid block type";
330 if ((
hold & 0xffff) != ((
hold >> 16) ^ 0xffff)) {
331 strm->msg = (
char *)
"invalid stored block lengths";
336 Tracev((stderr,
"inflate: stored length %u\n",
341 while (
state->length != 0) {
342 copy =
state->length;
346 if (copy > left) copy = left;
352 state->length -= copy;
354 Tracev((stderr,
"inflate: stored end\n"));
367 #ifndef PKZIP_BUG_WORKAROUND
369 strm->msg = (
char *)
"too many length or distance symbols";
374 Tracev((stderr,
"inflate: table sizes ok\n"));
383 while (
state->have < 19)
391 strm->msg = (
char *)
"invalid code lengths set";
395 Tracev((stderr,
"inflate: code lengths ok\n"));
402 if ((
unsigned)(here.
bits) <=
bits)
break;
410 if (here.
val == 16) {
413 if (
state->have == 0) {
414 strm->msg = (
char *)
"invalid bit length repeat";
422 else if (here.
val == 17) {
437 strm->msg = (
char *)
"invalid bit length repeat";
450 if (
state->lens[256] == 0) {
451 strm->msg = (
char *)
"invalid code -- missing end-of-block";
465 strm->msg = (
char *)
"invalid literal/lengths set";
474 strm->msg = (
char *)
"invalid distances set";
478 Tracev((stderr,
"inflate: codes ok\n"));
484 if (
have >= 6 && left >= 258) {
496 if ((
unsigned)(here.
bits) <=
bits)
break;
499 if (here.
op && (here.
op & 0xf0) == 0) {
515 "inflate: literal '%c'\n" :
516 "inflate: literal 0x%02x\n", here.
val));
518 *put++ = (
unsigned char)(
state->length);
526 Tracevv((stderr,
"inflate: end of block\n"));
533 strm->msg = (
char *)
"invalid literal/length code";
540 if (
state->extra != 0) {
545 Tracevv((stderr,
"inflate: length %u\n",
state->length));
550 if ((
unsigned)(here.
bits) <=
bits)
break;
553 if ((here.
op & 0xf0) == 0) {
565 strm->msg = (
char *)
"invalid distance code";
572 state->extra = (
unsigned)(here.
op) & 15;
573 if (
state->extra != 0) {
580 strm->msg = (
char *)
"invalid distance too far back";
584 Tracevv((stderr,
"inflate: distance %u\n",
state->offset));
598 if (copy >
state->length) copy =
state->length;
599 state->length -= copy;
604 }
while (
state->length != 0);
610 if (left < state->
wsize) {
void fixedtables(struct inflate_state FAR *state)
void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start)
static struct sockaddr static addrlen static backlog const void static flags void struct sockaddr from
if(dbg->bits==RZ_SYS_BITS_64)
void ZLIB_INTERNAL zmemcpy(Bytef *dest, const Bytef *source, uInt len)
References lzma_stream::avail_in, BAD, bits(), code::bits, BITS, BYTEBITS, CODES, DISTS, DONE, DROPBITS, FAR, fixedtables(), from, inflate_state::have, inflate_state::hold, if(), inflate_fast(), inflate_table(), INITBITS, inflate_state::last, len, LEN, LENS, LOAD, NEEDBITS, state::next, inflate_state::next, lzma_stream::next_in, code::op, out, PULL, PULLBYTE, RESTORE, ROOM, STORED, strm, TABLE, Tracev, Tracevv, TYPE, unsigned, code::val, inflate_state::wsize, Z_BUF_ERROR, z_const, Z_DATA_ERROR, Z_NULL, Z_STREAM_END, Z_STREAM_ERROR, and zmemcpy().
Referenced by gunpipe().