Lines Matching full:state
24 struct inflate_state *state = (struct inflate_state*)strm->state; in inf_chksum_cpy() local
26 if (state->flags) { in inf_chksum_cpy()
27 functable.crc32_fold_copy(&state->crc_fold, dst, src, copy); in inf_chksum_cpy()
31 strm->adler = state->check = functable.adler32_fold_copy(state->check, dst, src, copy); in inf_chksum_cpy()
36 struct inflate_state *state = (struct inflate_state*)strm->state; in inf_chksum() local
38 if (state->flags) { in inf_chksum()
39 functable.crc32_fold(&state->crc_fold, src, len, 0); in inf_chksum()
43 strm->adler = state->check = functable.adler32(state->check, src, len); in inf_chksum()
48 struct inflate_state *state; in inflateStateCheck() local
51 state = (struct inflate_state *)strm->state; in inflateStateCheck()
52 if (state == NULL || state->strm != strm || state->mode < HEAD || state->mode > SYNC) in inflateStateCheck()
58 struct inflate_state *state; in PREFIX() local
62 state = (struct inflate_state *)strm->state; in PREFIX()
63 strm->total_in = strm->total_out = state->total = 0; in PREFIX()
65 if (state->wrap) /* to support ill-conceived Java test suite */ in PREFIX()
66 strm->adler = state->wrap & 1; in PREFIX()
67 state->mode = HEAD; in PREFIX()
68 state->check = ADLER32_INITIAL_VALUE; in PREFIX()
69 state->last = 0; in PREFIX()
70 state->havedict = 0; in PREFIX()
71 state->flags = -1; in PREFIX()
72 state->dmax = 32768U; in PREFIX()
73 state->head = NULL; in PREFIX()
74 state->hold = 0; in PREFIX()
75 state->bits = 0; in PREFIX()
76 state->lencode = state->distcode = state->next = state->codes; in PREFIX()
77 state->sane = 1; in PREFIX()
78 state->back = -1; in PREFIX()
85 struct inflate_state *state; in PREFIX() local
89 state = (struct inflate_state *)strm->state; in PREFIX()
90 state->wsize = 0; in PREFIX()
91 state->whave = 0; in PREFIX()
92 state->wnext = 0; in PREFIX()
98 struct inflate_state *state; in PREFIX() local
100 /* get the state */ in PREFIX()
103 state = (struct inflate_state *)strm->state; in PREFIX()
120 if (state->window != NULL && state->wbits != (unsigned)windowBits) { in PREFIX()
121 ZFREE_WINDOW(strm, state->window); in PREFIX()
122 state->window = NULL; in PREFIX()
125 /* update state and reset the rest of it */ in PREFIX()
126 state->wrap = wrap; in PREFIX()
127 state->wbits = (unsigned)windowBits; in PREFIX()
133 struct inflate_state *state; in PREFIX() local
148 state = ZALLOC_INFLATE_STATE(strm); in PREFIX()
149 if (state == NULL) in PREFIX()
152 strm->state = (struct internal_state *)state; in PREFIX()
153 state->strm = strm; in PREFIX()
154 state->window = NULL; in PREFIX()
155 state->mode = HEAD; /* to pass state test in inflateReset2() */ in PREFIX()
156 state->chunksize = functable.chunksize(); in PREFIX()
159 ZFREE_STATE(strm, state); in PREFIX()
160 strm->state = NULL; in PREFIX()
170 struct inflate_state *state; in PREFIX() local
175 state = (struct inflate_state *)strm->state; in PREFIX()
177 state->hold = 0; in PREFIX()
178 state->bits = 0; in PREFIX()
181 if (bits > 16 || state->bits + (unsigned int)bits > 32) in PREFIX()
184 state->hold += (unsigned)value << state->bits; in PREFIX()
185 state->bits += (unsigned int)bits; in PREFIX()
190 Return state with length and distance decoding tables and index sizes set to
194 void Z_INTERNAL fixedtables(struct inflate_state *state) { in fixedtables() argument
195 state->lencode = lenfix; in fixedtables()
196 state->lenbits = 9; in fixedtables()
197 state->distcode = distfix; in fixedtables()
198 state->distbits = 5; in fixedtables()
201 int Z_INTERNAL PREFIX(inflate_ensure_window)(struct inflate_state *state) { in PREFIX()
203 if (state->window == NULL) { in PREFIX()
204 unsigned wsize = 1U << state->wbits; in PREFIX()
205 …state->window = (unsigned char *)ZALLOC_WINDOW(state->strm, wsize + state->chunksize, sizeof(unsig… in PREFIX()
206 if (state->window == NULL) in PREFIX()
212 __msan_unpoison(state->window + wsize, state->chunksize); in PREFIX()
217 if (state->wsize == 0) { in PREFIX()
218 state->wsize = 1U << state->wbits; in PREFIX()
219 state->wnext = 0; in PREFIX()
220 state->whave = 0; in PREFIX()
241 struct inflate_state *state; in updatewindow() local
244 state = (struct inflate_state *)strm->state; in updatewindow()
246 if (PREFIX(inflate_ensure_window)(state)) return 1; in updatewindow()
248 /* len state->wsize or less output bytes into the circular window */ in updatewindow()
249 if (len >= state->wsize) { in updatewindow()
256 if (len > state->wsize) in updatewindow()
257 inf_chksum(strm, end - len, len - state->wsize); in updatewindow()
258 inf_chksum_cpy(strm, state->window, end - state->wsize, state->wsize); in updatewindow()
260 memcpy(state->window, end - state->wsize, state->wsize); in updatewindow()
263 state->wnext = 0; in updatewindow()
264 state->whave = state->wsize; in updatewindow()
266 dist = state->wsize - state->wnext; in updatewindow()
271 inf_chksum_cpy(strm, state->window + state->wnext, end - len, dist); in updatewindow()
273 memcpy(state->window + state->wnext, end - len, dist); in updatewindow()
278 inf_chksum_cpy(strm, state->window, end - len, len); in updatewindow()
280 memcpy(state->window, end - len, len); in updatewindow()
283 state->wnext = len; in updatewindow()
284 state->whave = state->wsize; in updatewindow()
286 state->wnext += dist; in updatewindow()
287 if (state->wnext == state->wsize) in updatewindow()
288 state->wnext = 0; in updatewindow()
289 if (state->whave < state->wsize) in updatewindow()
290 state->whave += dist; in updatewindow()
311 inflate() uses a state machine to process as much input data and generate as
312 much output data as possible before returning. The state machine is
315 for (;;) switch (state) {
321 state = STATEm;
328 next state. The NEEDBITS() macro is usually the way the state evaluates
351 state information is maintained to continue the loop where it left off
353 would all have to actually be part of the saved state in case NEEDBITS()
362 state = STATEx;
365 As shown above, if the next state is also the next case, then the break
368 A state may also return if there is not enough output space available to
369 complete that state. Those states are copying stored data, writing a
393 struct inflate_state *state; in PREFIX() local
416 state = (struct inflate_state *)strm->state; in PREFIX()
417 if (state->mode == TYPE) /* skip check */ in PREFIX()
418 state->mode = TYPEDO; in PREFIX()
424 switch (state->mode) { in PREFIX()
426 if (state->wrap == 0) { in PREFIX()
427 state->mode = TYPEDO; in PREFIX()
432 if ((state->wrap & 2) && hold == 0x8b1f) { /* gzip header */ in PREFIX()
433 if (state->wbits == 0) in PREFIX()
434 state->wbits = 15; in PREFIX()
435 state->check = CRC32_INITIAL_VALUE; in PREFIX()
436 CRC2(state->check, hold); in PREFIX()
438 state->mode = FLAGS; in PREFIX()
441 if (state->head != NULL) in PREFIX()
442 state->head->done = -1; in PREFIX()
443 if (!(state->wrap & 1) || /* check if zlib header allowed */ in PREFIX()
457 if (state->wbits == 0) in PREFIX()
458 state->wbits = len; in PREFIX()
459 if (len > 15 || len > state->wbits) { in PREFIX()
463 state->dmax = 1U << len; in PREFIX()
464 state->flags = 0; /* indicate zlib header */ in PREFIX()
466 strm->adler = state->check = ADLER32_INITIAL_VALUE; in PREFIX()
467 state->mode = hold & 0x200 ? DICTID : TYPE; in PREFIX()
474 state->flags = (int)(hold); in PREFIX()
475 if ((state->flags & 0xff) != Z_DEFLATED) { in PREFIX()
479 if (state->flags & 0xe000) { in PREFIX()
483 if (state->head != NULL) in PREFIX()
484 state->head->text = (int)((hold >> 8) & 1); in PREFIX()
485 if ((state->flags & 0x0200) && (state->wrap & 4)) in PREFIX()
486 CRC2(state->check, hold); in PREFIX()
488 state->mode = TIME; in PREFIX()
492 if (state->head != NULL) in PREFIX()
493 state->head->time = hold; in PREFIX()
494 if ((state->flags & 0x0200) && (state->wrap & 4)) in PREFIX()
495 CRC4(state->check, hold); in PREFIX()
497 state->mode = OS; in PREFIX()
501 if (state->head != NULL) { in PREFIX()
502 state->head->xflags = (int)(hold & 0xff); in PREFIX()
503 state->head->os = (int)(hold >> 8); in PREFIX()
505 if ((state->flags & 0x0200) && (state->wrap & 4)) in PREFIX()
506 CRC2(state->check, hold); in PREFIX()
508 state->mode = EXLEN; in PREFIX()
511 if (state->flags & 0x0400) { in PREFIX()
513 state->length = (uint16_t)hold; in PREFIX()
514 if (state->head != NULL) in PREFIX()
515 state->head->extra_len = (uint16_t)hold; in PREFIX()
516 if ((state->flags & 0x0200) && (state->wrap & 4)) in PREFIX()
517 CRC2(state->check, hold); in PREFIX()
519 } else if (state->head != NULL) { in PREFIX()
520 state->head->extra = NULL; in PREFIX()
522 state->mode = EXTRA; in PREFIX()
525 if (state->flags & 0x0400) { in PREFIX()
526 copy = state->length; in PREFIX()
530 if (state->head != NULL && state->head->extra != NULL) { in PREFIX()
531 len = state->head->extra_len - state->length; in PREFIX()
532 memcpy(state->head->extra + len, next, in PREFIX()
533 len + copy > state->head->extra_max ? in PREFIX()
534 state->head->extra_max - len : copy); in PREFIX()
536 if ((state->flags & 0x0200) && (state->wrap & 4)) { in PREFIX()
537 state->check = PREFIX(crc32)(state->check, next, copy); in PREFIX()
541 state->length -= copy; in PREFIX()
543 if (state->length) in PREFIX()
546 state->length = 0; in PREFIX()
547 state->mode = NAME; in PREFIX()
550 if (state->flags & 0x0800) { in PREFIX()
555 … if (state->head != NULL && state->head->name != NULL && state->length < state->head->name_max) in PREFIX()
556 state->head->name[state->length++] = (unsigned char)len; in PREFIX()
558 if ((state->flags & 0x0200) && (state->wrap & 4)) in PREFIX()
559 state->check = PREFIX(crc32)(state->check, next, copy); in PREFIX()
564 } else if (state->head != NULL) { in PREFIX()
565 state->head->name = NULL; in PREFIX()
567 state->length = 0; in PREFIX()
568 state->mode = COMMENT; in PREFIX()
571 if (state->flags & 0x1000) { in PREFIX()
576 if (state->head != NULL && state->head->comment != NULL in PREFIX()
577 && state->length < state->head->comm_max) in PREFIX()
578 state->head->comment[state->length++] = (unsigned char)len; in PREFIX()
580 if ((state->flags & 0x0200) && (state->wrap & 4)) in PREFIX()
581 state->check = PREFIX(crc32)(state->check, next, copy); in PREFIX()
586 } else if (state->head != NULL) { in PREFIX()
587 state->head->comment = NULL; in PREFIX()
589 state->mode = HCRC; in PREFIX()
592 if (state->flags & 0x0200) { in PREFIX()
594 if ((state->wrap & 4) && hold != (state->check & 0xffff)) { in PREFIX()
600 if (state->head != NULL) { in PREFIX()
601 state->head->hcrc = (int)((state->flags >> 9) & 1); in PREFIX()
602 state->head->done = 1; in PREFIX()
605 if ((state->wrap & 4) && state->flags) in PREFIX()
606 strm->adler = state->check = functable.crc32_fold_reset(&state->crc_fold); in PREFIX()
607 state->mode = TYPE; in PREFIX()
612 strm->adler = state->check = ZSWAP32(hold); in PREFIX()
614 state->mode = DICT; in PREFIX()
617 if (state->havedict == 0) { in PREFIX()
621 strm->adler = state->check = ADLER32_INITIAL_VALUE; in PREFIX()
622 state->mode = TYPE; in PREFIX()
631 if (state->last) { in PREFIX()
633 state->mode = CHECK; in PREFIX()
637 state->last = BITS(1); in PREFIX()
641 Tracev((stderr, "inflate: stored block%s\n", state->last ? " (last)" : "")); in PREFIX()
642 state->mode = STORED; in PREFIX()
645 fixedtables(state); in PREFIX()
646 … Tracev((stderr, "inflate: fixed codes block%s\n", state->last ? " (last)" : "")); in PREFIX()
647 state->mode = LEN_; /* decode codes */ in PREFIX()
654 … Tracev((stderr, "inflate: dynamic codes block%s\n", state->last ? " (last)" : "")); in PREFIX()
655 state->mode = TABLE; in PREFIX()
671 state->length = (uint16_t)hold; in PREFIX()
672 Tracev((stderr, "inflate: stored length %u\n", state->length)); in PREFIX()
674 state->mode = COPY_; in PREFIX()
679 state->mode = COPY; in PREFIX()
683 copy = state->length; in PREFIX()
694 state->length -= copy; in PREFIX()
698 state->mode = TYPE; in PREFIX()
704 state->nlen = BITS(5) + 257; in PREFIX()
706 state->ndist = BITS(5) + 1; in PREFIX()
708 state->ncode = BITS(4) + 4; in PREFIX()
711 if (state->nlen > 286 || state->ndist > 30) { in PREFIX()
717 state->have = 0; in PREFIX()
718 state->mode = LENLENS; in PREFIX()
722 while (state->have < state->ncode) { in PREFIX()
724 state->lens[order[state->have++]] = (uint16_t)BITS(3); in PREFIX()
727 while (state->have < 19) in PREFIX()
728 state->lens[order[state->have++]] = 0; in PREFIX()
729 state->next = state->codes; in PREFIX()
730 state->lencode = (const code *)(state->next); in PREFIX()
731 state->lenbits = 7; in PREFIX()
732 … ret = zng_inflate_table(CODES, state->lens, 19, &(state->next), &(state->lenbits), state->work); in PREFIX()
738 state->have = 0; in PREFIX()
739 state->mode = CODELENS; in PREFIX()
743 while (state->have < state->nlen + state->ndist) { in PREFIX()
745 here = state->lencode[BITS(state->lenbits)]; in PREFIX()
751 state->lens[state->have++] = here.val; in PREFIX()
756 if (state->have == 0) { in PREFIX()
760 len = state->lens[state->have - 1]; in PREFIX()
776 if (state->have + copy > state->nlen + state->ndist) { in PREFIX()
782 state->lens[state->have++] = (uint16_t)len; in PREFIX()
788 if (state->mode == BAD) in PREFIX()
792 if (state->lens[256] == 0) { in PREFIX()
800 state->next = state->codes; in PREFIX()
801 state->lencode = (const code *)(state->next); in PREFIX()
802 state->lenbits = 9; in PREFIX()
803 …ret = zng_inflate_table(LENS, state->lens, state->nlen, &(state->next), &(state->lenbits), state->… in PREFIX()
808 state->distcode = (const code *)(state->next); in PREFIX()
809 state->distbits = 6; in PREFIX()
810 ret = zng_inflate_table(DISTS, state->lens + state->nlen, state->ndist, in PREFIX()
811 &(state->next), &(state->distbits), state->work); in PREFIX()
817 state->mode = LEN_; in PREFIX()
822 state->mode = LEN; in PREFIX()
830 if (state->mode == TYPE) in PREFIX()
831 state->back = -1; in PREFIX()
834 state->back = 0; in PREFIX()
838 here = state->lencode[BITS(state->lenbits)]; in PREFIX()
846 here = state->lencode[last.val + (BITS(last.bits + last.op) >> last.bits)]; in PREFIX()
852 state->back += last.bits; in PREFIX()
855 state->back += here.bits; in PREFIX()
856 state->length = here.val; in PREFIX()
863 state->mode = LIT; in PREFIX()
870 state->back = -1; in PREFIX()
871 state->mode = TYPE; in PREFIX()
882 state->extra = (here.op & 15); in PREFIX()
883 state->mode = LENEXT; in PREFIX()
887 if (state->extra) { in PREFIX()
888 NEEDBITS(state->extra); in PREFIX()
889 state->length += BITS(state->extra); in PREFIX()
890 DROPBITS(state->extra); in PREFIX()
891 state->back += state->extra; in PREFIX()
893 Tracevv((stderr, "inflate: length %u\n", state->length)); in PREFIX()
894 state->was = state->length; in PREFIX()
895 state->mode = DIST; in PREFIX()
900 here = state->distcode[BITS(state->distbits)]; in PREFIX()
908 here = state->distcode[last.val + (BITS(last.bits + last.op) >> last.bits)]; in PREFIX()
914 state->back += last.bits; in PREFIX()
917 state->back += here.bits; in PREFIX()
922 state->offset = here.val; in PREFIX()
923 state->extra = (here.op & 15); in PREFIX()
924 state->mode = DISTEXT; in PREFIX()
928 if (state->extra) { in PREFIX()
929 NEEDBITS(state->extra); in PREFIX()
930 state->offset += BITS(state->extra); in PREFIX()
931 DROPBITS(state->extra); in PREFIX()
932 state->back += state->extra; in PREFIX()
935 if (state->offset > state->dmax) { in PREFIX()
940 Tracevv((stderr, "inflate: distance %u\n", state->offset)); in PREFIX()
941 state->mode = MATCH; in PREFIX()
948 if (state->offset > copy) { /* copy from window */ in PREFIX()
949 copy = state->offset - copy; in PREFIX()
950 if (copy > state->whave) { in PREFIX()
951 if (state->sane) { in PREFIX()
957 copy -= state->whave; in PREFIX()
958 copy = MIN(copy, state->length); in PREFIX()
961 state->length -= copy; in PREFIX()
965 if (state->length == 0) in PREFIX()
966 state->mode = LEN; in PREFIX()
970 if (copy > state->wnext) { in PREFIX()
971 copy -= state->wnext; in PREFIX()
972 from = state->window + (state->wsize - copy); in PREFIX()
974 from = state->window + (state->wnext - copy); in PREFIX()
976 copy = MIN(copy, state->length); in PREFIX()
981 copy = MIN(state->length, left); in PREFIX()
983 put = functable.chunkmemset_safe(put, state->offset, copy, left); in PREFIX()
986 state->length -= copy; in PREFIX()
987 if (state->length == 0) in PREFIX()
988 state->mode = LEN; in PREFIX()
994 *put++ = (unsigned char)(state->length); in PREFIX()
996 state->mode = LEN; in PREFIX()
1000 if (state->wrap) { in PREFIX()
1004 state->total += out; in PREFIX()
1007 if (INFLATE_NEED_CHECKSUM(strm) && state->wrap & 4) { in PREFIX()
1012 if (state->flags) in PREFIX()
1013 strm->adler = state->check = functable.crc32_fold_final(&state->crc_fold); in PREFIX()
1017 if ((state->wrap & 4) && ( in PREFIX()
1019 state->flags ? hold : in PREFIX()
1021 ZSWAP32(hold)) != state->check) { in PREFIX()
1029 state->mode = LENGTH; in PREFIX()
1032 if (state->wrap && state->flags) { in PREFIX()
1034 if ((state->wrap & 4) && hold != (state->total & 0xffffffff)) { in PREFIX()
1042 state->mode = DONE; in PREFIX()
1065 error. Call updatewindow() to create and/or update the window state. in PREFIX()
1071 (state->wsize || (out != strm->avail_out && state->mode < BAD && in PREFIX()
1072 (state->mode < CHECK || flush != Z_FINISH)))) { in PREFIX()
1074 if (updatewindow(strm, strm->next_out, out - strm->avail_out, state->wrap & 4)) { in PREFIX()
1075 state->mode = MEM; in PREFIX()
1083 state->total += out; in PREFIX()
1085 strm->data_type = (int)state->bits + (state->last ? 64 : 0) + in PREFIX()
1086 … (state->mode == TYPE ? 128 : 0) + (state->mode == LEN_ || state->mode == COPY_ ? 256 : 0); in PREFIX()
1093 struct inflate_state *state; in PREFIX() local
1096 state = (struct inflate_state *)strm->state; in PREFIX()
1097 if (state->window != NULL) in PREFIX()
1098 ZFREE_WINDOW(strm, state->window); in PREFIX()
1099 ZFREE_STATE(strm, strm->state); in PREFIX()
1100 strm->state = NULL; in PREFIX()
1106 struct inflate_state *state; in PREFIX() local
1108 /* check state */ in PREFIX()
1111 state = (struct inflate_state *)strm->state; in PREFIX()
1114 if (state->whave && dictionary != NULL) { in PREFIX()
1115 memcpy(dictionary, state->window + state->wnext, state->whave - state->wnext); in PREFIX()
1116 memcpy(dictionary + state->whave - state->wnext, state->window, state->wnext); in PREFIX()
1119 *dictLength = state->whave; in PREFIX()
1124 struct inflate_state *state; in PREFIX() local
1128 /* check state */ in PREFIX()
1131 state = (struct inflate_state *)strm->state; in PREFIX()
1132 if (state->wrap != 0 && state->mode != DICT) in PREFIX()
1136 if (state->mode == DICT) { in PREFIX()
1138 if (dictid != state->check) in PREFIX()
1146 state->mode = MEM; in PREFIX()
1149 state->havedict = 1; in PREFIX()
1155 struct inflate_state *state; in PREFIX() local
1157 /* check state */ in PREFIX()
1160 state = (struct inflate_state *)strm->state; in PREFIX()
1161 if ((state->wrap & 2) == 0) in PREFIX()
1165 state->head = head; in PREFIX()
1174 state. If on return *have equals four, then the pattern was found and the
1178 called again with more data and the *have state. *have is initialized to
1204 struct inflate_state *state; in PREFIX() local
1209 state = (struct inflate_state *)strm->state; in PREFIX()
1210 if (strm->avail_in == 0 && state->bits < 8) in PREFIX()
1214 if (state->mode != SYNC) { in PREFIX()
1215 state->mode = SYNC; in PREFIX()
1216 state->hold <<= state->bits & 7; in PREFIX()
1217 state->bits -= state->bits & 7; in PREFIX()
1219 while (state->bits >= 8) { in PREFIX()
1220 buf[len++] = (unsigned char)(state->hold); in PREFIX()
1221 state->hold >>= 8; in PREFIX()
1222 state->bits -= 8; in PREFIX()
1224 state->have = 0; in PREFIX()
1225 syncsearch(&(state->have), buf, len); in PREFIX()
1229 len = syncsearch(&(state->have), strm->next_in, strm->avail_in); in PREFIX()
1235 if (state->have != 4) in PREFIX()
1237 if (state->flags == -1) in PREFIX()
1238 state->wrap = 0; /* if no header yet, treat as raw */ in PREFIX()
1240 state->wrap &= ~4; /* no point in computing a check value now */ in PREFIX()
1241 flags = state->flags; in PREFIX()
1247 state->flags = flags; in PREFIX()
1248 state->mode = TYPE; in PREFIX()
1261 struct inflate_state *state; in PREFIX() local
1266 state = (struct inflate_state *)strm->state; in PREFIX()
1267 return state->mode == STORED && state->bits == 0; in PREFIX()
1271 struct inflate_state *state; in PREFIX() local
1279 state = (struct inflate_state *)source->state; in PREFIX()
1286 if (state->window != NULL) { in PREFIX()
1287 wsize = 1U << state->wbits; in PREFIX()
1295 /* copy state */ in PREFIX()
1297 ZCOPY_INFLATE_STATE(copy, state); in PREFIX()
1299 if (state->lencode >= state->codes && state->lencode <= state->codes + ENOUGH - 1) { in PREFIX()
1300 copy->lencode = copy->codes + (state->lencode - state->codes); in PREFIX()
1301 copy->distcode = copy->codes + (state->distcode - state->codes); in PREFIX()
1303 copy->next = copy->codes + (state->next - state->codes); in PREFIX()
1305 wsize = 1U << state->wbits; in PREFIX()
1306 memcpy(window, state->window, wsize); in PREFIX()
1309 dest->state = (struct internal_state *)copy; in PREFIX()
1314 struct inflate_state *state; in PREFIX() local
1318 state = (struct inflate_state *)strm->state; in PREFIX()
1320 state->sane = !subvert; in PREFIX()
1324 state->sane = 1; in PREFIX()
1330 struct inflate_state *state; in PREFIX() local
1334 state = (struct inflate_state *)strm->state; in PREFIX()
1335 if (check && state->wrap) in PREFIX()
1336 state->wrap |= 4; in PREFIX()
1338 state->wrap &= ~4; in PREFIX()
1343 struct inflate_state *state; in PREFIX() local
1348 state = (struct inflate_state *)strm->state; in PREFIX()
1349 return (long)(((unsigned long)((long)state->back)) << 16) + in PREFIX()
1350 (state->mode == COPY ? state->length : in PREFIX()
1351 (state->mode == MATCH ? state->was - state->length : 0)); in PREFIX()
1355 struct inflate_state *state; in PREFIX() local
1356 if (strm == NULL || strm->state == NULL) in PREFIX()
1358 state = (struct inflate_state *)strm->state; in PREFIX()
1359 return (unsigned long)(state->next - state->codes); in PREFIX()