Home | History | Annotate | Download | only in gzip

Lines Matching refs:state

29 /* inflate private state */
49 *blocks; /* current inflate_blocks state */
57 if (z == Z_NULL || z->state == Z_NULL)
61 z->state->mode = z->state->nowrap ? BLOCKS : METHOD;
62 inflate_blocks_reset(z->state->blocks, z, Z_NULL);
71 if (z == Z_NULL || z->state == Z_NULL || z->zfree == Z_NULL)
73 if (z->state->blocks != Z_NULL)
74 inflate_blocks_free(z->state->blocks, z);
75 ZFREE(z, z->state);
76 z->state = Z_NULL;
92 /* initialize state */
102 if ((z->state = (struct internal_state FAR *)
105 z->state->blocks = Z_NULL;
108 z->state->nowrap = 0;
112 z->state->nowrap = 1;
121 z->state->wbits = (uInt)w;
123 /* create inflate_blocks state */
124 if ((z->state->blocks =
125 inflate_blocks_new(z, z->state->nowrap ? Z_NULL : adler32, (uInt)1 << w))
133 /* reset state */
154 if (z == Z_NULL || z->state == Z_NULL || z->next_in == Z_NULL)
158 while (1) switch (z->state->mode)
162 if (((z->state->sub.method = NEXTBYTE) & 0xf) != Z_DEFLATED)
164 z->state->mode = BAD;
166 z->state->sub.marker = 5; /* can't try inflateSync */
169 if ((z->state->sub.method >> 4) + 8 > z->state->wbits)
171 z->state->mode = BAD;
173 z->state->sub.marker = 5; /* can't try inflateSync */
176 z->state->mode = FLAG;
180 if (((z->state->sub.method << 8) + b) % 31)
182 z->state->mode = BAD;
184 z->state->sub.marker = 5; /* can't try inflateSync */
190 z->state->mode = BLOCKS;
193 z->state->mode = DICT4;
196 z->state->sub.check.need = (uLong)NEXTBYTE << 24;
197 z->state->mode = DICT3;
200 z->state->sub.check.need += (uLong)NEXTBYTE << 16;
201 z->state->mode = DICT2;
204 z->state->sub.check.need += (uLong)NEXTBYTE << 8;
205 z->state->mode = DICT1;
208 z->state->sub.check.need += (uLong)NEXTBYTE;
209 z->adler = z->state->sub.check.need;
210 z->state->mode = DICT0;
213 z->state->mode = BAD;
215 z->state->sub.marker = 0; /* can try inflateSync */
218 r = inflate_blocks(z->state->blocks, z, r);
221 z->state->mode = BAD;
222 z->state->sub.marker = 0; /* can try inflateSync */
230 inflate_blocks_reset(z->state->blocks, z, &z->state->sub.check.was);
231 if (z->state->nowrap)
233 z->state->mode = DONE;
236 z->state->mode = CHECK4;
239 z->state->sub.check.need = (uLong)NEXTBYTE << 24;
240 z->state->mode = CHECK3;
243 z->state->sub.check.need += (uLong)NEXTBYTE << 16;
244 z->state->mode = CHECK2;
247 z->state->sub.check.need += (uLong)NEXTBYTE << 8;
248 z->state->mode = CHECK1;
251 z->state->sub.check.need += (uLong)NEXTBYTE;
253 if (z->state->sub.check.was != z->state->sub.check.need)
255 z->state->mode = BAD;
257 z->state->sub.marker = 5; /* can't try inflateSync */
261 z->state->mode = DONE;