Lines Matching refs:nbBits

148 static void HUF_setNbBits(HUF_CElt* elt, size_t nbBits)  in HUF_setNbBits()  argument
150 assert(nbBits <= HUF_TABLELOG_ABSOLUTEMAX); in HUF_setNbBits()
151 *elt = nbBits; in HUF_setNbBits()
156 size_t const nbBits = HUF_getNbBits(*elt); in HUF_setValue() local
157 if (nbBits > 0) { in HUF_setValue()
158 assert((value >> nbBits) == 0); in HUF_setValue()
159 *elt |= value << (sizeof(HUF_CElt) * 8 - nbBits); in HUF_setValue()
282 BYTE nbBits; member
307 const U32 largestBits = huffNode[lastNonNull].nbBits; in HUF_setMaxHeight()
320 while (huffNode[n].nbBits > maxNbBits) { in HUF_setMaxHeight()
321 totalCost += baseCost - (1 << (largestBits - huffNode[n].nbBits)); in HUF_setMaxHeight()
322 huffNode[n].nbBits = (BYTE)maxNbBits; in HUF_setMaxHeight()
326 assert(huffNode[n].nbBits <= maxNbBits); in HUF_setMaxHeight()
328 while (huffNode[n].nbBits == maxNbBits) --n; in HUF_setMaxHeight()
345 if (huffNode[pos].nbBits >= currentNbBits) continue; in HUF_setMaxHeight()
346 currentNbBits = huffNode[pos].nbBits; /* < maxNbBits */ in HUF_setMaxHeight()
375 huffNode[rankLast[nBitsToDecrease]].nbBits++; in HUF_setMaxHeight()
394 if (huffNode[rankLast[nBitsToDecrease]].nbBits != maxNbBits-nBitsToDecrease) in HUF_setMaxHeight()
410 while (huffNode[n].nbBits == maxNbBits) n--; in HUF_setMaxHeight()
411 huffNode[n+1].nbBits--; in HUF_setMaxHeight()
417 huffNode[ rankLast[1] + 1 ].nbBits--; in HUF_setMaxHeight()
634 huffNode[nodeRoot].nbBits = 0; in HUF_buildTree()
636 huffNode[n].nbBits = huffNode[ huffNode[n].parent ].nbBits + 1; in HUF_buildTree()
638 huffNode[n].nbBits = huffNode[ huffNode[n].parent ].nbBits + 1; in HUF_buildTree()
662 nbPerRank[huffNode[n].nbBits]++; in HUF_buildCTableFromTree()
671 …HUF_setNbBits(ct + huffNode[n].byte, huffNode[n].nbBits); /* push nbBits per symbol, symbol orde… in HUF_buildCTableFromTree()
710 size_t nbBits = 0; in HUF_estimateCompressedSize() local
713 nbBits += HUF_getNbBits(ct[s]) * count[s]; in HUF_estimateCompressedSize()
715 return nbBits >> 3; in HUF_estimateCompressedSize()
806 size_t const nbBits = HUF_getNbBits(elt); in HUF_addBits() local
807 size_t const dirtyBits = nbBits == 0 ? 0 : BIT_highbit32((U32)nbBits) + 1; in HUF_addBits()
810 assert(((elt >> dirtyBits) << (dirtyBits + nbBits)) == 0); in HUF_addBits()
847 size_t const nbBits = bitC->bitPos[0] & 0xFF; in HUF_flushBits() local
848 size_t const nbBytes = nbBits >> 3; in HUF_flushBits()
850 size_t const bitContainer = bitC->bitContainer[0] >> (HUF_BITS_IN_CONTAINER - nbBits); in HUF_flushBits()
853 assert(nbBits > 0); in HUF_flushBits()
854 assert(nbBits <= sizeof(bitC->bitContainer[0]) * 8); in HUF_flushBits()
885 size_t const nbBits = bitC->bitPos[0] & 0xFF; in HUF_closeCStream() local
887 return (bitC->ptr - bitC->startPtr) + (nbBits > 0); in HUF_closeCStream()