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

Lines Matching defs:symbol

65  *                      - Catch missing end-of-block symbol error
201 * symbol[] are the symbol values in canonical order, where the number of
207 short *symbol; /* canonically ordered symbols */
211 * Decode a code from the stream s using huffman table h. Return the symbol or
240 int index; /* index of first code of length len in symbol table */
246 if (code - count < first) /* if length len, return symbol */
247 return h->symbol[index + (code - first)];
268 int index; /* index of first code of length len in symbol table */
283 if (code - count < first) { /* if length len, return symbol */
286 return h->symbol[index + (code - first)];
317 * enough bits will resolve to a symbol. If the return value is positive, then
324 * one symbol, which is an error in a dynamic block.
333 * codes and any code with a single symbol which in deflate is coded as one
341 int symbol; /* current symbol when stepping through length[] */
344 short offs[MAXBITS+1]; /* offsets in symbol table for each length */
349 for (symbol = 0; symbol < n; symbol++)
350 (h->count[length[symbol]])++; /* assumes lengths are within bounds */
363 /* generate offsets into symbol table for each length for sorting */
369 * put symbols in table sorted by length, by symbol order within each
372 for (symbol = 0; symbol < n; symbol++)
373 if (length[symbol] != 0)
374 h->symbol[offs[length[symbol]]++] = symbol;
394 * symbols (257..285), and the end-of-block symbol (256).
398 * by just a length symbol. Lengths 11..257 are represented as a symbol and
400 * of the length symbol. The number of extra bits is determined by the base
401 * length symbol. These are in the static arrays below, lens[] for the base
404 * - The reason that 258 gets its own symbol is that the longest length is used
412 * to a base value represented by the symbol. The distances 1..4 get their
413 * own symbol, but the rest require extra bits. The base distances and
439 int symbol; /* decoded symbol */
459 symbol = decode(s, lencode);
460 if (symbol < 0)
461 return symbol; /* invalid symbol */
462 if (symbol < 256) { /* literal: symbol is the byte */
467 s->out[s->outcnt] = symbol;
471 else if (symbol > 256) { /* length */
473 symbol -= 257;
474 if (symbol >= 29)
476 len = lens[symbol] + bits(s, lext[symbol]);
479 symbol = decode(s, distcode);
480 if (symbol < 0)
481 return symbol; /* invalid symbol */
482 dist = dists[symbol] + bits(s, dext[symbol]);
505 } while (symbol != 256); /* end of block symbol */
520 * codes and distance codes are fixed. The specific lengths for each symbol
544 int symbol;
549 lencode.symbol = lensym;
551 distcode.symbol = distsym;
554 for (symbol = 0; symbol < 144; symbol++)
555 lengths[symbol] = 8;
556 for (; symbol < 256; symbol++)
557 lengths[symbol] = 9;
558 for (; symbol < 280; symbol++)
559 lengths[symbol] = 7;
560 for (; symbol < FIXLCODES; symbol++)
561 lengths[symbol] = 8;
565 for (symbol = 0; symbol < MAXDCODES; symbol++)
566 lengths[symbol] = 5;
589 * are simply a list of code lengths for each symbol.
595 * - If a symbol is not used in the block, this is represented by a zero as
597 * that no code should be created for this symbol. There is no way in the
604 * interesting consequence. Normally if only one symbol is used for a given
607 * only a single distance base symbol appears in a block, then it will be
610 * and should result in an error. So incomplete distance codes of one symbol
617 * literal/length codes of one symbol should also be permitted.
624 * the list of code lengths, a 0 symbol means no code, a 1..15 symbol means
633 * representing no code (0) or the code length for that symbol (1..7).
678 lencode.symbol = lensym;
680 distcode.symbol = distsym;
703 int symbol; /* decoded value */
706 symbol = decode(s, &lencode);
707 if (symbol < 16) /* length in 0..15 */
708 lengths[index++] = symbol;
711 if (symbol == 16) { /* repeat last length 3..6 times */
715 symbol = 3 + bits(s, 2);
717 else if (symbol == 17) /* repeat zero 3..10 times */
718 symbol = 3 + bits(s, 3);
720 symbol = 11 + bits(s, 7);
721 if (index + symbol > nlen + ndist)
723 while (symbol--) /* repeat last or zero symbol times */