Lines Matching refs:trees

447                 /* used by trees.c: */
460 int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */
464 * The same heap array is used to build all trees.
468 /* Depth of each subtree used as tie breaker for trees of equal frequency
484 * - creating new Huffman trees less frequently may not provide fast
489 * trees more frequently.
501 ulg opt_len; /* bit length of current block with optimal trees */
502 ulg static_len; /* bit length of current block with static trees */
538 /* in trees.c */
1845 /* +++ trees.c */
1846 /* trees.c -- output deflated data using Huffman coding
1854 * The "deflation" process uses several Huffman trees. The more
1877 /* From: trees.c,v 1.11 1996/07/24 13:41:06 me Exp $ */
2181 /* Initialize the trees. */
2572 /* Determine the bit length frequencies for literal and distance trees */
2591 Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
2598 * Send the header for a block using dynamic Huffman trees: the counts, the
2688 * Determine the best encoding for the current block: dynamic trees, static
2689 * trees or store, and output the encoded block to the zip file. This function
2701 /* Build the Huffman trees unless a stored block is forced */
2707 /* Construct the literal and distance trees */
2719 /* Build the bit length tree for the above two trees, and get the index
2773 } else if (static_lenb >= 0) { /* force static trees */
2850 * Send the block data compressed using the given Huffman trees
2996 /* --- trees.c */
3547 DTREE, /* get length, distance trees for a dynamic block */
3569 } trees; /* if DTREE, decoding info for trees */
3572 inflate_huft *td; /* trees to free */
3661 However, static trees define 32 codes (all 5 bits) to fill out the
3693 ZFREE(z, s->sub.trees.blens);
3837 s->sub.trees.table = t = (uInt)b & 0x3fff;
3850 if ((s->sub.trees.blens = (uIntf*)ZALLOC(z, t, sizeof(uInt))) == Z_NULL)
3856 s->sub.trees.index = 0;
3860 while (s->sub.trees.index < 4 + (s->sub.trees.table >> 10))
3863 s->sub.trees.blens[border[s->sub.trees.index++]] = (uInt)b & 7;
3866 while (s->sub.trees.index < 19)
3867 s->sub.trees.blens[border[s->sub.trees.index++]] = 0;
3868 s->sub.trees.bb = 7;
3869 t = inflate_trees_bits(s->sub.trees.blens, &s->sub.trees.bb,
3870 &s->sub.trees.tb, z);
3875 ZFREE(z, s->sub.trees.blens);
3880 s->sub.trees.index = 0;
3884 while (t = s->sub.trees.table,
3885 s->sub.trees.index < 258 + (t & 0x1f) + ((t >> 5) & 0x1f))
3890 t = s->sub.trees.bb;
3892 h = s->sub.trees.tb + ((uInt)b & inflate_mask[t]);
3898 s->sub.trees.blens[s->sub.trees.index++] = c;
3908 i = s->sub.trees.index;
3909 t = s->sub.trees.table;
3913 inflate_trees_free(s->sub.trees.tb, z);
3914 ZFREE(z, s->sub.trees.blens);
3920 c = c == 16 ? s->sub.trees.blens[i - 1] : 0;
3922 s->sub.trees.blens[i++] = c;
3924 s->sub.trees.index = i;
3927 inflate_trees_free(s->sub.trees.tb, z);
3928 s->sub.trees.tb = Z_NULL;
3936 t = s->sub.trees.table;
3941 s->sub.trees.blens, &bl, &bd, &tl, &td, z);
3945 ZFREE(z, s->sub.trees.blens);
3951 Tracev((stderr, "inflate: trees ok, %d * %d bytes used\n",
3962 * sub.trees is union'd with sub.decode.
3964 ZFREE(z, s->sub.trees.blens);
4104 /* inftrees.c -- generate Huffman trees for efficient decoding