Lines Matching defs:CODES
309 /* number of length codes, not counting the special END_BLOCK code */
315 /* number of Literal or Length codes, including the END_BLOCK code */
318 /* number of distance codes */
321 /* number of codes used to transfer the bit lengths */
327 /* All codes must not exceed MAX_BITS bits */
474 /* number of codes at each bit length for an optimal tree */
822 * output size for (length,distance) codes is <= 24 bits.
2017 /* Bit length codes must not exceed MAX_BL_BITS bits */
2042 /* The lengths of the bit length codes are sent in order of decreasing
2043 * probability, to avoid transmitting the lengths for unused bit length codes.
2062 * need for the L_CODES extra codes used during heap construction. However
2063 * The codes 286 and 287 are needed to build a canonical tree (see _tr_init
2068 /* The static distance tree. (Actually a trivial tree since all codes use
2073 /* Distance codes. The first 256 values correspond to the distances
2226 int max_length; /* max bit length for the codes */
2346 /* number of codes at each bit length for an optimal tree */
2390 /* Construct the codes of the static literal tree */
2397 /* Codes 286 and 287 do not exist, but we must include them in the
2664 * Generate the codes for a given tree and bit counts (which need not be
2673 ushf *bl_count) /* number of codes at each bit length */
2740 * two codes of non zero frequency.
2790 /* The field len is now set, we can generate the bit codes */
2795 * Scan a literal or distance tree to determine the frequencies of the codes
2839 * Send a literal or distance tree in compressed form, using the codes in
2903 * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
2906 /* Determine the number of bit length codes to send. The pkzip format
2907 * requires that at least 4 bit length codes be sent. (appnote.txt says
2923 * lengths of the bit length codes, the literal tree and the distance tree.
2927 int lcodes, int dcodes, int blcodes) /* number of codes for each tree */
2931 Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
2933 "too many codes");
2982 * last two codes for the previous block (real code plus EOB) were coded
3813 uInt, /* number of literal/length codes */
3814 uInt, /* number of distance codes */
3864 /* infutil.h -- types and macros common to blocks and codes
3884 CODES, /* processing fixed or dynamic block */
3902 uIntf *blens; /* bit lengths of codes */
3908 *codes;
3909 } decode; /* if CODES, current state */
3988 codes exist, they are coded using one bit each (0 and 1).
3989 5. There is no way of sending zero distance codes--a dummy must be
3991 store blocks with no distance codes, but this was discovered to be
3993 zero distance codes, which is sent as one code of zero bits in
3995 6. There are up to 286 literal/length codes. Code 256 represents the
3997 288 codes just to fill out the Huffman codes. Codes 286 and 287
3999 defined for them. Similarly, there are up to 30 distance codes.
4000 However, static trees define 32 codes (all 5 bits) to fill out the
4001 Huffman codes, but the last two had better not show up in the data.
4005 literal codes sent minus 257.
4006 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits
4008 three codes (1+1+1), whereas to output four times the same length,
4009 you only need two codes (1+3). Hmm.
4012 11. Correction: 4 Bits: # of Bit Length codes - 4 (4 - 19)
4030 if (s->mode == CODES)
4031 inflate_codes_free(s->sub.decode.codes, z);
4101 Tracev((stderr, "inflate: fixed codes block%s\n",
4108 s->sub.decode.codes = inflate_codes_new(bl, bd, tl, td, z);
4109 if (s->sub.decode.codes == Z_NULL)
4116 s->mode = CODES;
4119 Tracev((stderr, "inflate: dynamic codes block%s\n",
4281 s->sub.decode.codes = c;
4284 s->mode = CODES;
4286 case CODES:
4291 inflate_codes_free(s->sub.decode.codes, z);
4293 Tracev((stderr, "inflate: codes end, %lu total out\n",
4453 uInt, /* number of codes */
4454 uInt, /* number of "simple" codes */
4455 const uIntf *, /* list of base values for non-simple codes */
4456 const uIntf *, /* list of extra bits for non-simple codes */
4464 local const uInt cplens[31] = { /* Copy lengths for literal codes 257..285 */
4468 local const uInt cplext[31] = { /* Extra bits for literal codes 257..285 */
4471 local const uInt cpdist[30] = { /* Copy offsets for distance codes 0..29 */
4475 local const uInt cpdext[30] = { /* Extra bits for distance codes */
4485 is not very long. The most common codes are necessarily the
4486 shortest codes, so those codes dominate the decoding time, and hence
4488 shorter, more probable codes, and then point to subsidiary tables for
4489 the longer codes. The time it costs to decode the longer codes is
4494 length codes can decode in one step, and dbits is the same thing for
4495 the distance codes. Subsequent tables are also less than or equal to
4497 codes are shorter than that, in which case the longest code length in
4504 codes 286 possible values, or in a flat code, a little over eight
4505 bits. The distance table codes 30 possible values, or a little less
4517 uInt n, /* number of codes (assumed <= 288) */
4518 uInt s, /* number of simple-valued codes (0..s-1) */
4519 const uIntf *d, /* list of base values for non-simple codes */
4520 const uIntf *e, /* list of extra bits for non-simple codes */
4528 tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR
4533 uInt a; /* counter for codes of length k */
4550 int y; /* number of dummy codes added */
4565 if (c[0] == n) /* null input--all zero length codes */
4590 /* Adjust last length count to fill out codes, if needed */
4616 /* Generate the Huffman codes and for each, make the table entries */
4642 { /* too few codes for k-w bit table */
4643 f -= a + 1; /* deduct codes from patterns left */
4649 break; /* enough codes to use up j bits */
4650 f -= *xp; /* else deduct codes from patterns */
4746 uInt nd, /* number of literal/length codes */
4747 uIntf *c, /* number of distance codes */
4820 /* inffixed.h -- table for decoding fixed codes
5086 /* inflate codes
5128 Tracev((stderr, "inflate: codes new\n"));
5146 inflate_codes_statef *c = s->sub.decode.codes; /* codes state */
5302 Tracev((stderr, "inflate: codes free\n"));
5308 /* inflate_util.c -- data and routines common to blocks and codes