Lines Matching full:codes

22    matches (of at least length 3), it codes the next byte.  Otherwise, it
23 codes the length of the matched string and its distance backwards from
24 the current position. There is a single Huffman code that codes both
26 code codes the distance information, which follows a length code. Each
45 an encoding of the literal/length and distance Huffman codes that are
49 a predefined set of codes, called the fixed codes. The fixed method is
50 used if the block codes up smaller that way (usually for quite small
52 codes are customized to the probabilities in the current block, and so
53 can code it much better than the pre-determined fixed codes.
55 The Huffman codes themselves are decoded using a multi-level table
72 codes exist, they are coded using one bit each (0 and 1).
73 5. There is no way of sending zero distance codes--a dummy must be
75 store blocks with no distance codes, but this was discovered to be
77 zero distance codes, which is sent as one code of zero bits in
79 6. There are up to 286 literal/length codes. Code 256 represents the
81 288 codes just to fill out the Huffman codes. Codes 286 and 287
83 defined for them. Similarly, there are up to 30 distance codes.
84 However, static trees define 32 codes (all 5 bits) to fill out the
85 Huffman codes, but the last two had better not show up in the data.
89 literal codes sent minus 257.
90 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits
92 three codes (1+1+1), whereas to output four times the same length,
93 you only need two codes (1+3). Hmm.
96 11. Correction: 4 Bits: # of Bit Length codes - 4 (4 - 19)
136 the next table, which codes e - 16 bits, and lastly e == 99 indicates
176 static const ush cplens[] = { /* Copy lengths for literal codes 257..285 */
180 static const ush cplext[] = { /* Extra bits for literal codes 257..285 */
183 static const ush cpdist[] = { /* Copy offsets for distance codes 0..29 */
187 static const ush cpdext[] = { /* Extra bits for distance codes */
214 is 7 bits, but the other literal/length codes can be 8 or 9 bits.
215 (The EOB code is shorter than other codes because fixed blocks are
217 literal/length codes have a significantly lower probability of
282 is not very long. The most common codes are necessarily the
283 shortest codes, so those codes dominate the decoding time, and hence
285 shorter, more probable codes, and then point to subsidiary tables for
286 the longer codes. The time it costs to decode the longer codes is
291 length codes can decode in one step, and dbits is the same thing for
292 the distance codes. Subsequent tables are also less than or equal to
294 codes are shorter than that, in which case the longest code length in
301 codes 286 possible values, or in a flat code, a little over eight
302 bits. The distance table codes 30 possible values, or a little less
316 #define N_MAX 288 /* maximum number of codes in any set */
324 unsigned n, /* number of codes (assumed <= N_MAX) */ in huft_build()
325 unsigned s, /* number of simple-valued codes (0..s-1) */ in huft_build()
326 const ush *d, /* list of base values for non-simple codes */ in huft_build()
327 const ush *e, /* list of extra bits for non-simple codes */ in huft_build()
332 tables to decode that set of codes. Return zero on success, one if in huft_build()
334 case), two if the input is invalid (all zero length codes or an in huft_build()
337 unsigned a; /* counter for codes of length k */ in huft_build()
350 int y; /* number of dummy codes added */ in huft_build()
382 if (c[0] == n) /* null input--all zero length codes */ in huft_build()
410 /* Adjust last length count to fill out codes, if needed */ in huft_build()
413 ret = 2; /* bad input: more codes than bits */ in huft_build()
443 /* Generate the Huffman codes and for each, make the table entries */ in huft_build()
472 { /* too few codes for k-w bit table */ in huft_build()
474 f -= a + 1; /* deduct codes from patterns left */ in huft_build()
480 break; /* enough codes to use up j bits */ in huft_build()
481 f -= *xp; /* else deduct codes from patterns */ in huft_build()
595 /* inflate (decompress) the codes in a deflated (compressed) block. in inflate_codes()
766 /* decompress an inflated type 1 (fixed Huffman codes) block. We should in inflate_fixed()
830 /* decompress an inflated type 2 (dynamic Huffman codes) block. */ in inflate_dynamic()
841 unsigned nb; /* number of bit length codes */ in inflate_dynamic()
842 unsigned nl; /* number of literal/length codes */ in inflate_dynamic()
843 unsigned nd; /* number of distance codes */ in inflate_dynamic()
867 nl = 257 + ((unsigned)b & 0x1f); /* number of literal/length codes */ in inflate_dynamic()
870 nd = 1 + ((unsigned)b & 0x1f); /* number of distance codes */ in inflate_dynamic()
873 nb = 4 + ((unsigned)b & 0xf); /* number of bit length codes */ in inflate_dynamic()
935 else if (j == 17) /* 3 to 10 zero length codes */ in inflate_dynamic()
948 else /* j == 18: 11 to 138 zero length codes */ in inflate_dynamic()
976 /* build the decoding tables for literal/length and distance codes */ in inflate_dynamic()