• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/contrib/zstd/lib/compress/

Lines Matching refs:symbol

80     /* Scan input and build symbol stats */
82 if (maxCount == wtSize) return 1; /* only a single symbol in src : rle */
83 if (maxCount == 1) return 0; /* each symbol present maximum once => not compressible */
151 /* get symbol weights */
185 /* assign value within rank, symbol order */
215 * @pre The sum of the ranks of each symbol == 2^largestBits,
217 * @post The sum of the ranks of each symbol == 2^largestBits,
221 * @param lastNonNull The symbol with the lowest count in the Huffman tree.
250 /* n end at index of smallest symbol using < maxNbBits */
263 /* Get pos of last (smallest = lowest cum. count) symbol per rank */
290 /* only triggered when no more rank 1 symbol left => find closest one (note : there is necessarily at least one !) */
301 * If the new rank was empty, this symbol is now its smallest.
302 * Otherwise, this symbol will be the largest in the new rank so no adjustment.
307 * If the symbol was at position 0, meaning it was the highest weight symbol in the tree,
308 * it must be the only symbol in its rank, so the old rank now has no symbols.
313 if (rankLast[nBitsToDecrease] == 0) /* special case, reached largest symbol */
329 /* special case : no rank 1 symbol (using maxNbBits-1);
366 * Sorts the symbols [0, maxSymbolValue] by count[symbol] in decreasing order.
371 * @param[in] maxSymbolValue Maximum symbol value.
380 * For symbol s let lowerRank = BIT_highbit32(count[n]+1) and rank = lowerRank + 1.
382 * We attribute each symbol to lowerRank's base value, because we want to know where
423 * @param maxSymbolValue The maximum symbol value.
469 * @param maxSymbolValue The maximum symbol value.
489 CTable[huffNode[n].byte].nbBits = huffNode[n].nbBits; /* push nbBits per symbol, symbol order */
491 CTable[n].val = valPerRank[CTable[n].nbBits]++; /* assign value within rank, symbol order */
547 HUF_encodeSymbol(BIT_CStream_t* bitCPtr, U32 symbol, const HUF_CElt* CTable)
549 BIT_addBitsFast(bitCPtr, CTable[symbol].val, CTable[symbol].nbBits);
775 /* Scan input and build symbol stats */
777 if (largest == srcSize) { *ostart = ((const BYTE*)src)[0]; return 1; } /* single symbol, rle */