Lines Matching refs:codes

302 /* number of length codes, not counting the special END_BLOCK code */
308 /* number of Literal or Length codes, including the END_BLOCK code */
311 /* number of distance codes */
314 /* number of codes used to transfer the bit lengths */
320 /* All codes must not exceed MAX_BITS bits */
484 /* number of codes at each bit length for an optimal tree */
868 * the average output size for (length, distance) codes is <=
2256 /* Bit length codes must not exceed MAX_BL_BITS bits */
2288 * The lengths of the bit length codes are sent in order of decreasing
2290 * length codes.
2308 * is no need for the L_CODES extra codes used during heap
2309 * construction. However The codes 286 and 287 are needed to build a
2315 * The static distance tree. (Actually a trivial tree since all codes
2321 * distance codes. The first 256 values correspond to the distances 3
2340 int max_length; /* max bit length for the codes */
2467 /* number of codes at each bit length for an optimal tree */
2514 /* Construct the codes of the static literal tree */
2746 * Generate the codes for a given tree and bit counts (which need not be
2757 ushf *bl_count; /* number of codes at each bit length */
2834 * later on we force at least two codes of non zero frequency.
2890 /* The field len is now set, we can generate the bit codes */
2896 * Scan a literal or distance tree to determine the frequencies of the codes
2943 * Send a literal or distance tree in compressed form, using the codes in
3022 * codes and the 5+5+4 bits for the counts.
3026 * Determine the number of bit length codes to send. The pkzip
3027 * format requires that at least 4 bit length codes be
3044 * lengths of the bit length codes, the literal tree and the distance tree.
3050 int lcodes, dcodes, blcodes; /* number of codes for each tree */
3055 "not enough codes");
3057 "too many codes");
3120 * last two codes for the previous block (real code plus EOB) were coded
4082 uInt, /* number of literal/length codes */
4083 uInt, /* number of distance codes */
4135 * infutil.h -- types and macros common to blocks and codes
4174 uIntf *blens; /* bit lengths of codes */
4179 inflate_codes_statef *codes;
4258 * codes exist, they are coded using one bit each (0 and 1).
4259 * 5. There is no way of sending zero distance codes--a dummy must be
4261 * store blocks with no distance codes, but this was discovered to be
4263 * zero distance codes, which is sent as one code of zero bits in
4265 * 6. There are up to 286 literal/length codes. Code 256 represents the
4267 * 288 codes just to fill out the Huffman codes. Codes 286 and 287
4269 * defined for them. Similarily, there are up to 30 distance codes.
4270 * However, static trees define 32 codes (all 5 bits) to fill out the
4271 * Huffman codes, but the last two had better not show up in the data.
4275 * literal codes sent minus 257.
4276 * 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits
4278 * three codes (1+1+1), whereas to output four times the same length,
4279 * you only need two codes (1+3). Hmm.
4282 * 11. Correction: 4 Bits: #of Bit Length codes - 4 (4 - 19)
4307 if (s->mode == CODES && s->sub.decode.codes != Z_NULL) {
4308 (void) inflate_codes_free(s->sub.decode.codes, z);
4309 s->sub.decode.codes = Z_NULL;
4388 Trace((stderr, "inflate: fixed codes block%s\n",
4396 s->sub.decode.codes = inflate_codes_new(bl,
4398 if (s->sub.decode.codes == Z_NULL)
4408 Trace((stderr, "inflate: dynamic codes block%s\n",
4583 s->sub.decode.codes = c;
4592 (void) inflate_codes_free(s->sub.decode.codes, z);
4594 Tracev((stderr, "inflate: codes end, %lu total out\n",
4765 uInt, /* number of codes */
4766 uInt, /* number of "simple" codes */
4767 const uIntf *, /* list of base values for non-simple codes */
4768 const uIntf *, /* list of extra bits for non-simple codes */
4776 local const uInt cplens[31] = { /* Copy lengths for literal codes 257..285 */
4780 local const uInt cplext[31] = { /* Extra bits for literal codes 257..285 */
4784 local const uInt cpdist[30] = { /* Copy offsets for distance codes 0..29 */
4788 local const uInt cpdext[30] = { /* Extra bits for distance codes */
4798 * being decoded is not very long. The most common codes are
4799 * necessarily the shortest codes, so those codes dominate the
4801 * shorter table that decodes the shorter, more probable codes, and
4802 * then point to subsidiary tables for the longer codes. The time it
4803 * costs to decode the longer codes is then traded against the time it
4808 * literal/ length codes can decode in one step, and dbits is the same
4809 * thing for the distance codes. Subsequent tables are also less than
4811 * all of the codes are shorter than that, in which case the longest
4818 * codes 286 possible values, or in a flat code, a little over eight
4819 * bits. The distance table codes 30 possible values, or a little
4834 uInt n; /* number of codes (assumed <= 288) */
4835 uInt s; /* number of simple-valued codes (0..s-1) */
4836 const uIntf *d; /* list of base values for non-simple codes */
4837 const uIntf *e; /* list of extra bits for non-simple codes */
4845 * of tables to decode that set of codes. Return Z_OK on success,
4853 uInt a; /* counter for codes of length k */
4870 int y; /* number of dummy codes added */
4884 if (c[0] == n) /* null input--all zero length codes */
4909 /* Adjust last length count to fill out codes, if needed */
4935 /* Generate the Huffman codes and for each, make the table entries */
4966 /* too few codes for k-w bit table */
4967 /* deduct codes from patterns left */
4978 * codes to
4987 * codes from
5094 uInt nl; /* number of literal/length codes */
5095 uInt nd; /* number of distance codes */
5263 /* inflate codes private state */
5320 Tracev((stderr, "inflate: codes new\n"));
5342 inflate_codes_statef *c = s->sub.decode.codes; /* codes state */
5512 Tracev((stderr, "inflate: codes free\n"));
5518 * inflate_util.c -- data and routines common to blocks and codes