Lines Matching defs:trees
463 /* used by trees.c: */
476 int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */
480 * The same heap array is used to build all trees.
484 /* Depth of each subtree used as tie breaker for trees of equal frequency
500 * - creating new Huffman trees less frequently may not provide fast
505 * trees more frequently.
517 ulg opt_len; /* bit length of current block with optimal trees */
518 ulg static_len; /* bit length of current block with static trees */
554 /* in trees.c */
1969 /* +++ trees.c */
1971 /* trees.c -- output deflated data using Huffman coding
1979 * The "deflation" process uses several Huffman trees. The more
2058 /* non ANSI compilers may not accept trees.h */
2088 /* +++ trees.h */
2217 /* --- trees.h */
2417 * Genererate the file trees.h describing the static trees.
2430 FILE *header = fopen("trees.h", "w");
2433 Assert (header != NULL, "Can't open trees.h");
2512 /* Initialize the trees. */
2896 /* Determine the bit length frequencies for literal and distance trees */
2915 Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
2922 * Send the header for a block using dynamic Huffman trees: the counts, the
3014 * Determine the best encoding for the current block: dynamic trees, static
3015 * trees or store, and output the encoded block to the zip file.
3025 /* Build the Huffman trees unless a stored block is forced */
3031 /* Construct the literal and distance trees */
3043 /* Build the bit length tree for the above two trees, and get the index
3078 } else if (static_lenb >= 0) { /* force static trees */
3165 * Send the block data compressed using the given Huffman trees
3305 /* --- trees.c */
3809 inflate_huft *, /* space for trees */
3820 inflate_huft *, /* space for trees */
3883 DTREE, /* get length, distance trees for a dynamic block */
3905 } trees; /* if DTREE, decoding info for trees */
4000 However, static trees define 32 codes (all 5 bits) to fill out the
4029 ZFREE(z, s->sub.trees.blens);
4165 s->sub.trees.table = t = (uInt)b & 0x3fff;
4176 if ((s->sub.trees.blens = (uIntf*)ZALLOC(z, t, sizeof(uInt))) == Z_NULL)
4182 s->sub.trees
4186 while (s->sub.trees.index < 4 + (s->sub.trees.table >> 10))
4189 s->sub.trees.blens[border[s->sub.trees.index++]] = (uInt)b & 7;
4192 while (s->sub.trees.index < 19)
4193 s->sub.trees.blens[border[s->sub.trees.index++]] = 0;
4194 s->sub.trees.bb = 7;
4195 t = inflate_trees_bits(s->sub.trees.blens, &s->sub.trees.bb,
4196 &s->sub.trees.tb, s->hufts, z);
4202 ZFREE(z, s->sub.trees.blens);
4207 s->sub.trees.index = 0;
4211 while (t = s->sub.trees.table,
4212 s->sub.trees.index < 258 + (t & 0x1f) + ((t >> 5) & 0x1f))
4217 t = s->sub.trees.bb;
4219 h = s->sub.trees.tb + ((uInt)b & inflate_mask[t]);
4225 s->sub.trees.blens[s->sub.trees.index++] = c;
4235 i = s->sub.trees.index;
4236 t = s->sub.trees.table;
4240 ZFREE(z, s->sub.trees.blens);
4246 c = c == 16 ? s->sub.trees.blens[i - 1] : 0;
4248 s->sub.trees.blens[i++] = c;
4250 s->sub.trees.index = i;
4253 s->sub.trees.tb = Z_NULL;
4261 t = s->sub.trees.table;
4263 s->sub.trees.blens, &bl, &bd, &tl, &td,
4269 ZFREE(z, s->sub.trees.blens);
4275 Tracev((stderr, "inflate: trees ok\n"));
4283 ZFREE(z, s->sub.trees.blens);
4421 /* inftrees.c -- generate Huffman trees for efficient decoding
4459 inflate_huft *, /* space for trees */
4523 inflate_huft *hp, /* space for trees */
4722 inflate_huft *hp, /* space for trees */
4752 inflate_huft *hp, /* space for trees */