Lines Matching refs:codes

156 /* number of length codes, not counting the special END_BLOCK code */
162 /* number of Literal or Length codes, including the END_BLOCK code */
165 /* number of distance codes */
168 /* number of codes used to transfer the bit lengths */
174 /* All codes must not exceed MAX_BITS bits */
322 /* number of codes at each bit length for an optimal tree */
650 * output size for (length,distance) codes is <= 32 bits (worst case
1482 /* Bit length codes must not exceed MAX_BL_BITS bits */
1507 /* The lengths of the bit length codes are sent in order of decreasing
1508 * probability, to avoid transmitting the lengths for unused bit length codes.
1523 * need for the L_CODES extra codes used during heap construction. However
1524 * The codes 286 and 287 are needed to build a canonical tree (see ct_init
1529 /* The static distance tree. (Actually a trivial tree since all codes use
1534 /* distance codes. The first 256 values correspond to the distances
1553 int max_length; /* max bit length for the codes */
1678 /* number of codes at each bit length for an optimal tree */
1713 /* Construct the codes of the static literal tree */
1928 * Generate the codes for a given tree and bit counts (which need not be
1938 ushf *bl_count; /* number of codes at each bit length */
2006 * two codes of non zero frequency.
2056 /* The field len is now set, we can generate the bit codes */
2061 * Scan a literal or distance tree to determine the frequencies of the codes
2106 * Send a literal or distance tree in compressed form, using the codes in
2172 * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
2175 /* Determine the number of bit length codes to send. The pkzip format
2176 * requires that at least 4 bit length codes be sent. (appnote.txt says
2192 * lengths of the bit length codes, the literal tree and the distance tree.
2197 int lcodes, dcodes, blcodes; /* number of codes for each tree */
2201 Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
2203 "too many codes");
2680 uInt, /* number of literal/length codes */
2681 uInt, /* number of distance codes */
3037 /* infutil.h -- types and macros common to blocks and codes
3070 uIntf *blens; /* bit lengths of codes */
3078 *codes;
3172 codes exist, they are coded using one bit each (0 and 1).
3173 5. There is no way of sending zero distance codes--a dummy must be
3175 store blocks with no distance codes, but this was discovered to be
3177 zero distance codes, which is sent as one code of zero bits in
3179 6. There are up to 286 literal/length codes. Code 256 represents the
3181 288 codes just to fill out the Huffman codes. Codes 286 and 287
3183 defined for them. Similarily, there are up to 30 distance codes.
3184 However, static trees define 32 codes (all 5 bits) to fill out the
3185 Huffman codes, but the last two had better not show up in the data.
3189 literal codes sent minus 257.
3190 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits
3192 three codes (1+1+1), whereas to output four times the same length,
3193 you only need two codes (1+3). Hmm.
3196 11. Correction: 4 Bits: # of Bit Length codes - 4 (4 - 19)
3219 inflate_codes_free(s->sub.decode.codes, z);
3291 Trace((stderr, "inflate: fixed codes block%s\n",
3298 s->sub.decode.codes = inflate_codes_new(bl, bd, tl, td, z);
3299 if (s->sub.decode.codes == Z_NULL)
3311 Trace((stderr, "inflate: dynamic codes block%s\n",
3472 s->sub.decode.codes = c;
3482 inflate_codes_free(s->sub.decode.codes, z);
3486 Tracev((stderr, "inflate: codes end, %lu total out\n",
3615 uInt, /* number of codes */
3616 uInt, /* number of "simple" codes */
3617 uIntf *, /* list of base values for non-simple codes */
3618 uIntf *, /* list of extra bits for non-simple codes */
3634 local uInt cplens[] = { /* Copy lengths for literal codes 257..285 */
3638 local uInt cplext[] = { /* Extra bits for literal codes 257..285 */
3641 local uInt cpdist[] = { /* Copy offsets for distance codes 0..29 */
3645 local uInt cpdext[] = { /* Extra bits for distance codes */
3655 is not very long. The most common codes are necessarily the
3656 shortest codes, so those codes dominate the decoding time, and hence
3658 shorter, more probable codes, and then point to subsidiary tables for
3659 the longer codes. The time it costs to decode the longer codes is
3664 length codes can decode in one step, and dbits is the same thing for
3665 the distance codes. Subsequent tables are also less than or equal to
3667 codes are shorter than that, in which case the longest code length in
3674 codes 286 possible values, or in a flat code, a little over eight
3675 bits. The distance table codes 30 possible values, or a little less
3685 #define N_MAX 288 /* maximum number of codes in any set */
3693 uInt n; /* number of codes (assumed <= N_MAX) */
3694 uInt s; /* number of simple-valued codes (0..s-1) */
3695 uIntf *d; /* list of base values for non-simple codes */
3696 uIntf *e; /* list of extra bits for non-simple codes */
3701 tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR
3703 case), Z_DATA_ERROR if the input is invalid (all zero length codes or an
3707 uInt a; /* counter for codes of length k */
3724 int y; /* number of dummy codes added */
3738 if (c[0] == n) /* null input--all zero length codes */
3763 /* Adjust last length count to fill out codes, if needed */
3788 /* Generate the Huffman codes and for each, make the table entries */
3813 { /* too few codes for k-w bit table */
3814 f -= a + 1; /* deduct codes from patterns left */
3820 break; /* enough codes to use up j bits */
3821 f -= *xp; /* else deduct codes from patterns */
3916 uInt nl; /* number of literal/length codes */
3917 uInt nd; /* number of distance codes */
4082 /* inflate codes private state */
4137 Tracev((stderr, "inflate: codes new\n"));
4158 inflate_codes_statef *c = s->sub.decode.codes; /* codes state */
4308 Tracev((stderr, "inflate: codes free\n"));
4312 /* inflate_util.c -- data and routines common to blocks and codes