Lines Matching refs:nbBits
130 wksp->huffWeight[n] = wksp->bitsToWeight[CTable[n].nbBits]; in HUF_writeCTable_wksp()
186 CTable[n].nbBits = (BYTE)(tableLog + 1 - w) & -(w != 0); in HUF_readCTable()
192 { U32 n; for (n=0; n<nbSymbols; n++) nbPerRank[CTable[n].nbBits]++; } in HUF_readCTable()
202 { U32 n; for (n=0; n<nbSymbols; n++) CTable[n].val = valPerRank[CTable[n].nbBits]++; } in HUF_readCTable()
213 return table[symbolValue].nbBits; in HUF_getNbBits()
221 BYTE nbBits; member
246 const U32 largestBits = huffNode[lastNonNull].nbBits; in HUF_setMaxHeight()
259 while (huffNode[n].nbBits > maxNbBits) { in HUF_setMaxHeight()
260 totalCost += baseCost - (1 << (largestBits - huffNode[n].nbBits)); in HUF_setMaxHeight()
261 huffNode[n].nbBits = (BYTE)maxNbBits; in HUF_setMaxHeight()
265 assert(huffNode[n].nbBits <= maxNbBits); in HUF_setMaxHeight()
267 while (huffNode[n].nbBits == maxNbBits) --n; in HUF_setMaxHeight()
284 if (huffNode[pos].nbBits >= currentNbBits) continue; in HUF_setMaxHeight()
285 currentNbBits = huffNode[pos].nbBits; /* < maxNbBits */ in HUF_setMaxHeight()
314 huffNode[rankLast[nBitsToDecrease]].nbBits++; in HUF_setMaxHeight()
333 if (huffNode[rankLast[nBitsToDecrease]].nbBits != maxNbBits-nBitsToDecrease) in HUF_setMaxHeight()
349 while (huffNode[n].nbBits == maxNbBits) n--; in HUF_setMaxHeight()
350 huffNode[n+1].nbBits--; in HUF_setMaxHeight()
356 huffNode[ rankLast[1] + 1 ].nbBits--; in HUF_setMaxHeight()
469 huffNode[nodeRoot].nbBits = 0; in HUF_buildTree()
471 huffNode[n].nbBits = huffNode[ huffNode[n].parent ].nbBits + 1; in HUF_buildTree()
473 huffNode[n].nbBits = huffNode[ huffNode[n].parent ].nbBits + 1; in HUF_buildTree()
496 nbPerRank[huffNode[n].nbBits]++; in HUF_buildCTableFromTree()
505 … CTable[huffNode[n].byte].nbBits = huffNode[n].nbBits; /* push nbBits per symbol, symbol order */ in HUF_buildCTableFromTree()
507 … CTable[n].val = valPerRank[CTable[n].nbBits]++; /* assign value within rank, symbol order */ in HUF_buildCTableFromTree()
543 size_t nbBits = 0; in HUF_estimateCompressedSize() local
546 nbBits += CTable[s].nbBits * count[s]; in HUF_estimateCompressedSize()
548 return nbBits >> 3; in HUF_estimateCompressedSize()
555 bad |= (count[s] != 0) & (CTable[s].nbBits == 0); in HUF_validateCTable()
565 BIT_addBitsFast(bitCPtr, CTable[symbol].val, CTable[symbol].nbBits); in HUF_encodeSymbol()