• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/zlib-1.2.3/contrib/puff/

Lines Matching defs:symbol

184  * symbol[] are the symbol values in canonical order, where the number of
190 short *symbol; /* canonically ordered symbols */
194 * Decode a code from the stream s using huffman table h. Return the symbol or
223 int index; /* index of first code of length len in symbol table */
229 if (code < first + count) /* if length len, return symbol */
230 return h->symbol[index + (code - first)];
251 int index; /* index of first code of length len in symbol table */
266 if (code < first + count) { /* if length len, return symbol */
269 return h->symbol[index + (code - first)];
297 * enough bits will resolve to a symbol. If the return value is positive, then
304 * one symbol, which is an error in a dynamic block.
313 * codes and any code with a single symbol which in deflate is coded as one
321 int symbol; /* current symbol when stepping through length[] */
324 short offs[MAXBITS+1]; /* offsets in symbol table for each length */
329 for (symbol = 0; symbol < n; symbol++)
330 (h->count[length[symbol]])++; /* assumes lengths are within bounds */
342 /* generate offsets into symbol table for each length for sorting */
348 * put symbols in table sorted by length, by symbol order within each
351 for (symbol = 0; symbol < n; symbol++)
352 if (length[symbol] != 0)
353 h->symbol[offs[length[symbol]]++] = symbol;
373 * symbols (257..285), and the end-of-block symbol (256).
377 * by just a length symbol. Lengths 11..257 are represented as a symbol and
379 * of the length symbol. The number of extra bits is determined by the base
380 * length symbol. These are in the static arrays below, lens[] for the base
383 * - The reason that 258 gets its own symbol is that the longest length is used
391 * to a base value represented by the symbol. The distances 1..4 get their
392 * own symbol, but the rest require extra bits. The base distances and
418 int symbol; /* decoded symbol */
438 symbol = decode(s, lencode);
439 if (symbol < 0) return symbol; /* invalid symbol */
440 if (symbol < 256) { /* literal: symbol is the byte */
444 s->out[s->outcnt] = symbol;
448 else if (symbol > 256) { /* length */
450 symbol -= 257;
451 if (symbol >= 29) return -9; /* invalid fixed code */
452 len = lens[symbol] + bits(s, lext[symbol]);
455 symbol = decode(s, distcode);
456 if (symbol < 0) return symbol; /* invalid symbol */
457 dist = dists[symbol] + bits(s, dext[symbol]);
472 } while (symbol != 256); /* end of block symbol */
487 * codes and distance codes are fixed. The specific lengths for each symbol
512 int symbol;
516 for (symbol = 0; symbol < 144; symbol++)
517 lengths[symbol] = 8;
518 for (; symbol < 256; symbol++)
519 lengths[symbol] = 9;
520 for (; symbol < 280; symbol++)
521 lengths[symbol] = 7;
522 for (; symbol < FIXLCODES; symbol++)
523 lengths[symbol] = 8;
527 for (symbol = 0; symbol < MAXDCODES; symbol++)
528 lengths[symbol] = 5;
551 * are simply a list of code lengths for each symbol.
557 * - If a symbol is not used in the block, this is represented by a zero as
559 * that no code should be created for this symbol. There is no way in the
566 * interesting consequence. Normally if only one symbol is used for a given
569 * only a single distance base symbol appears in a block, then it will be
572 * and should result in an error. So incomplete distance codes of one symbol
579 * literal/length codes of one symbol should also be permitted.
586 * the list of code lengths, a 0 symbol means no code, a 1..15 symbol means
595 * representing no code (0) or the code length for that symbol (1..7).
659 int symbol; /* decoded value */
662 symbol = decode(s, &lencode);
663 if (symbol < 16) /* length in 0..15 */
664 lengths[index++] = symbol;
667 if (symbol == 16) { /* repeat last length 3..6 times */
670 symbol = 3 + bits(s, 2);
672 else if (symbol == 17) /* repeat zero 3..10 times */
673 symbol = 3 + bits(s, 3);
675 symbol = 11 + bits(s, 7);
676 if (index + symbol > nlen + ndist)
678 while (symbol--) /* repeat last or zero symbol times */