Lines Matching refs:lengths

52  * 1.3  20 Mar 2002     - Go back to lengths for puff() parameters [Gailly]
94 #define MAXCODES (MAXLCODES+MAXDCODES) /* maximum codes lengths to read */
213 * a negative value if there is an error. If all of the lengths are zero, i.e.
220 * a simple integer ordering of codes of the same lengths. Hence below the
309 * Given the list of code lengths length[0..n-1] representing a canonical
320 * codes past the end of the incomplete lengths.
351 (h->count[length[symbol]])++; /* assumes lengths are within bounds */
355 /* check for an over-subscribed or incomplete set of lengths */
393 * - Literals, lengths, and the end-of-block code are combined into a single
397 * - There are 256 possible lengths (3..258), and so 29 symbols are not enough
403 * lengths and lext[] for the corresponding number of extra bits.
520 * spent on code descriptions. Instead the code lengths for literal/length
521 * codes and distance codes are fixed. The specific lengths for each symbol
546 short lengths[FIXLCODES];
556 lengths[symbol] = 8;
558 lengths[symbol] = 9;
560 lengths[symbol] = 7;
562 lengths[symbol] = 8;
563 construct(&lencode, lengths, FIXLCODES);
567 lengths[symbol] = 5;
568 construct(&distcode, lengths, MAXDCODES);
590 * are simply a list of code lengths for each symbol.
592 * - The code lengths are stored in order for the symbols, so lengths are
601 * - The maximum number of bits in a code is 15, so the possible lengths for
620 * - If there are only literal codes and no lengths, then there are no distance
623 * - The list of up to 286 length/literal lengths and up to 30 distance lengths
625 * the list of code lengths, a 0 symbol means no code, a 1..15 symbol means
629 * zero lengths, and 18 represents 11 to 138 zero lengths. Unused symbols
630 * are common, hence the special coding for zero lengths.
637 * the number of literal/length code lengths, the number of distance code
638 * lengths, and the number of code length code lengths (ok, you come up with
640 * distance codes, lengths after those provided are considered zero, i.e. no
641 * code. The code length code lengths are received in a permuted order (see
647 * - Given the number of literal/length code lengths (nlen) and distance code
648 * lengths (ndist), then they are treated as one long list of nlen + ndist
649 * code lengths. Therefore run-length coding can and often does cross the
650 * boundary between the two sets of lengths.
653 * three counts for the number of code lengths for the literal/length codes,
655 * code length code lengths, three bits each. This is used to construct the
656 * code length code which is used to read the remainder of the lengths. Then
657 * the literal/length code lengths and distance lengths are read as a single
658 * set of lengths using the code length codes. Codes are constructed from
659 * the resulting two sets of lengths, and then finally you can start
667 int nlen, ndist, ncode; /* number of lengths in descriptor */
668 int index; /* index of lengths[] */
670 short lengths[MAXCODES]; /* descriptor code lengths */
683 /* get number of lengths in each table, check lengths */
690 /* read code length code lengths (really), missing lengths are zero */
692 lengths[order[index]] = bits(s, 3);
694 lengths[order[index]] = 0;
696 /* build huffman table for code lengths codes (use lencode temporarily) */
697 err = construct(&lencode, lengths, 19);
711 lengths[index++] = symbol;
717 len = lengths[index - 1]; /* last length */
725 return -6; /* too many lengths! */
727 lengths[index++] = len;
732 if (lengths[256] == 0)
736 err = construct(&lencode, lengths, nlen);
741 err = construct(&distcode, lengths + nlen, ndist);
774 * -4: dynamic block code description: code lengths codes incomplete
775 * -5: dynamic block code description: repeat lengths with no first length
776 * -6: dynamic block code description: repeat more than specified lengths
777 * -7: dynamic block code description: invalid literal/length code lengths
778 * -8: dynamic block code description: invalid distance code lengths
834 /* update the lengths and return */