Lines Matching defs:lengths

52  * 1.3  20 Mar 2002     - Go back to lengths for puff() parameters [Gailly]
93 #define MAXCODES (MAXLCODES+MAXDCODES) /* maximum codes lengths to read */
212 * a negative value if there is an error. If all of the lengths are zero, i.e.
219 * a simple integer ordering of codes of the same lengths. Hence below the
308 * Given the list of code lengths length[0..n-1] representing a canonical
319 * codes past the end of the incomplete lengths.
350 (h->count[length[symbol]])++; /* assumes lengths are within bounds */
354 /* check for an over-subscribed or incomplete set of lengths */
392 * - Literals, lengths, and the end-of-block code are combined into a single
396 * - There are 256 possible lengths (3..258), and so 29 symbols are not enough
402 * lengths and lext[] for the corresponding number of extra bits.
519 * spent on code descriptions. Instead the code lengths for literal/length
520 * codes and distance codes are fixed. The specific lengths for each symbol
545 short lengths[FIXLCODES];
555 lengths[symbol] = 8;
557 lengths[symbol] = 9;
559 lengths[symbol] = 7;
561 lengths[symbol] = 8;
562 construct(&lencode, lengths, FIXLCODES);
566 lengths[symbol] = 5;
567 construct(&distcode, lengths, MAXDCODES);
589 * are simply a list of code lengths for each symbol.
591 * - The code lengths are stored in order for the symbols, so lengths are
600 * - The maximum number of bits in a code is 15, so the possible lengths for
619 * - If there are only literal codes and no lengths, then there are no distance
622 * - The list of up to 286 length/literal lengths and up to 30 distance lengths
624 * the list of code lengths, a 0 symbol means no code, a 1..15 symbol means
628 * zero lengths, and 18 represents 11 to 138 zero lengths. Unused symbols
629 * are common, hence the special coding for zero lengths.
636 * the number of literal/length code lengths, the number of distance code
637 * lengths, and the number of code length code lengths (ok, you come up with
639 * distance codes, lengths after those provided are considered zero, i.e. no
640 * code. The code length code lengths are received in a permuted order (see
646 * - Given the number of literal/length code lengths (nlen) and distance code
647 * lengths (ndist), then they are treated as one long list of nlen + ndist
648 * code lengths. Therefore run-length coding can and often does cross the
649 * boundary between the two sets of lengths.
652 * three counts for the number of code lengths for the literal/length codes,
654 * code length code lengths, three bits each. This is used to construct the
655 * code length code which is used to read the remainder of the lengths. Then
656 * the literal/length code lengths and distance lengths are read as a single
657 * set of lengths using the code length codes. Codes are constructed from
658 * the resulting two sets of lengths, and then finally you can start
666 int nlen, ndist, ncode; /* number of lengths in descriptor */
667 int index; /* index of lengths[] */
669 short lengths[MAXCODES]; /* descriptor code lengths */
682 /* get number of lengths in each table, check lengths */
689 /* read code length code lengths (really), missing lengths are zero */
691 lengths[order[index]] = bits(s, 3);
693 lengths[order[index]] = 0;
695 /* build huffman table for code lengths codes (use lencode temporarily) */
696 err = construct(&lencode, lengths, 19);
708 lengths[index++] = symbol;
714 len = lengths[index - 1]; /* last length */
722 return -6; /* too many lengths! */
724 lengths[index++] = len;
729 if (lengths[256] == 0)
733 err = construct(&lencode, lengths, nlen);
738 err = construct(&distcode, lengths + nlen, ndist);
771 * -4: dynamic block code description: code lengths codes incomplete
772 * -5: dynamic block code description: repeat lengths with no first length
773 * -6: dynamic block code description: repeat more than specified lengths
774 * -7: dynamic block code description: invalid literal/length code lengths
775 * -8: dynamic block code description: invalid distance code lengths
831 /* update the lengths and return */