Lines Matching defs:length

48 /* Bit length codes must not exceed MAX_BL_BITS bits */
54 /* repeat previous bit length 3-6 times (2 bits of repeat count) */
57 /* repeat a zero length 3-10 times (3 bits of repeat count) */
60 /* repeat a zero length 11-138 times (7 bits of repeat count) */
62 local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */
68 local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */
73 /* The lengths of the bit length codes are sent in order of decreasing
74 * probability, to avoid transmitting the lengths for unused bit length codes.
105 /* length code for each normalized match length (0 == MIN_MATCH) */
108 /* First normalized length for each code (0 = MIN_MATCH) */
122 int max_length; /* max bit length for the codes */
197 * IN assertion: the array bl_count contains the bit length statistics for
200 * zero code length.
203 ush next_code[MAX_BITS+1]; /* next code value for each bit length */
249 * IN assertion: length <= 16 and value fits in length bits.
252 local void send_bits(deflate_state *s, int value, int length) {
253 Tracevv((stderr," l %2d v %4x ", length, value));
254 Assert(length > 0 && length <= 15, "invalid length");
255 s->bits_sent += (ulg)length;
261 if (s->bi_valid > (int)Buf_size - length) {
265 s->bi_valid += length - Buf_size;
268 s->bi_valid += length;
273 #define send_bits(s, value, length) \
274 { int len = length;\
299 int length; /* length value */
303 /* number of codes at each bit length for an optimal tree */
316 /* Initialize the mapping length (0..255) -> length code (0..28) */
317 length = 0;
319 base_length[code] = length;
321 _length_code[length++] = (uch)code;
324 Assert (length == 256, "tr_static_init: length != 256");
325 /* Note that the length 255 (match length 258) can be represented
329 _length_code[length - 1] = (uch)code;
495 * the subtrees have equal frequency. This minimizes the worst case length.
529 * Compute the optimal bit lengths for a tree and update the total bit length
533 * OUT assertions: the field len is set to the optimal bit length, the
534 * array bl_count contains the frequencies for each bit length.
535 * The length opt_len is updated; static_len is also updated if stree is
547 int bits; /* bit length */
550 int overflow = 0; /* number of elements with bit length too large */
555 * overflow in the case of the bit length tree).
577 Tracev((stderr,"\nbit length overflow\n"));
580 /* Find the first bit length which could increase: */
619 * Update the total bit length for the current block.
621 * OUT assertions: the fields len and code are set to the optimal bit length
622 * and corresponding code. The length opt_len is updated; static_len is
708 * in the bit length tree.
712 int prevlen = -1; /* last emitted length */
713 int curlen; /* length of current code */
714 int nextlen = tree[0].Len; /* length of next code */
753 int prevlen = -1; /* last emitted length */
754 int curlen; /* length of current code */
755 int nextlen = tree[0].Len; /* length of next code */
796 * bl_order of the last bit length code to send.
799 int max_blindex; /* index of last bit length code of non zero freq */
801 /* Determine the bit length frequencies for literal and distance trees */
805 /* Build the bit length tree: */
807 /* opt_len now includes the length of the tree representations, except the
811 /* Determine the number of bit length codes to send. The pkzip format
812 * requires that at least 4 bit length codes be sent. (appnote.txt says
818 /* Update opt_len to include the bit length tree and counts */
828 * lengths of the bit length codes, the literal tree and the distance tree.
901 int lc; /* match length or unmatched char (if dist == 0) */
919 /* Here, lc is the match length - MIN_MATCH */
921 send_code(s, code + LITERALS + 1, ltree); /* send length code */
925 send_bits(s, lc, extra); /* send the extra length bits */
999 int max_blindex = 0; /* index of last bit length code of non zero freq */
1020 /* Build the bit length tree for the above two trees, and get the index
1021 * in bl_order of the last bit length code to send.
1108 /* Here, lc is the match length - MIN_MATCH */