13 #define exop word.what.Exop 14 #define bits word.what.Bits 30 struct inflate_codes_state {
67 ZALLOC(z,1,
sizeof(
struct inflate_codes_state))) !=
Z_NULL)
74 Tracev((stderr,
"inflate: codes new\n"));
101 while (1)
switch (c->mode)
105 if (m >= 258 && n >= 10)
108 r =
inflate_fast(c->lbits, c->dbits, c->ltree, c->dtree, s, z);
117 c->sub.code.need = c->lbits;
118 c->sub.code.tree = c->ltree;
121 j = c->sub.code.need;
128 c->sub.lit = t->base;
129 Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ?
130 "inflate: literal '%c'\n" :
131 "inflate: literal 0x%02x\n", t->base));
137 c->sub.copy.get = e & 15;
144 c->sub.code.need = e;
145 c->sub.code.tree = t + t->base;
150 Tracevv((stderr,
"inflate: end of block\n"));
155 z->msg = (
char*)
"invalid literal/length code";
163 c->sub.code.need = c->dbits;
164 c->sub.code.tree = c->dtree;
165 Tracevv((stderr,
"inflate: length %u\n", c->len));
168 j = c->sub.code.need;
175 c->sub.copy.get = e & 15;
176 c->sub.copy.dist = t->base;
182 c->sub.code.need = e;
183 c->sub.code.tree = t + t->base;
187 z->msg = (
char*)
"invalid distance code";
195 Tracevv((stderr,
"inflate: distance %u\n", c->sub.copy.dist));
198 f = q - c->sub.copy.dist;
200 f += s->end - s->window;
219 Assert(k < 16,
"inflate_codes grabbed too many bytes")
225 if (s->read != s->write)
238 #ifdef NEED_DUMMY_RETURN 249 Tracev((stderr,
"inflate: codes free\n"));
local int inflate_codes(inflate_blocks_statef *s, z_streamp z, int r)
struct inflate_blocks_state FAR inflate_blocks_statef
#define ZALLOC(strm, items, size)
GLdouble GLdouble GLdouble GLdouble q
void inflate_fast(z_streamp strm, unsigned start)
GLboolean GLboolean GLboolean b
local void inflate_codes_free(inflate_codes_statef *c, z_streamp z)
#define Assert(cond, msg)
GLdouble GLdouble GLdouble r
local const uInt inflate_mask[17]
#define ZFREE(strm, addr)
struct inflate_huft_s FAR inflate_huft
local inflate_codes_statef * inflate_codes_new(uInt bl, uInt bd, inflate_huft *tl, inflate_huft *td, z_streamp z)
struct inflate_codes_state FAR inflate_codes_statef