ZSTD_highbit32
bitD->bitsConsumed = lastByte ? 8 - ZSTD_highbit32(lastByte) : 0; /* ensures bitsConsumed is always set */
bitD->bitsConsumed = lastByte ? 8 - ZSTD_highbit32(lastByte) : 0;
nbBits = ZSTD_highbit32(remaining) + 1;
{ U32 const tableLog = ZSTD_highbit32(weightTotal) + 1;
U32 const verif = 1 << ZSTD_highbit32(rest);
U32 const lastWeight = ZSTD_highbit32(rest) + 1;
tableDecode[u].nbBits = (BYTE) (tableLog - ZSTD_highbit32(nextState) );
{ U32 const maxBitsOut = tableLog - ZSTD_highbit32 ((U32)normalizedCounter[s]-1);
U32 minBitsSrc = ZSTD_highbit32((U32)(srcSize)) + 1;
U32 minBitsSymbols = ZSTD_highbit32(maxSymbolValue) + 2;
U32 maxBitsSrc = ZSTD_highbit32((U32)(srcSize - 1)) - minus;
U32 minBitsSymbols = ZSTD_highbit32(symbolCardinality) + 1;
U32 nBitsToDecrease = ZSTD_highbit32((U32)totalCost) + 1;
#define RANK_POSITION_DISTINCT_COUNT_CUTOFF (RANK_POSITION_LOG_BUCKETS_BEGIN + ZSTD_highbit32(RANK_POSITION_LOG_BUCKETS_BEGIN) /* == 166 */)
: ZSTD_highbit32(count) + RANK_POSITION_LOG_BUCKETS_BEGIN;
size_t const dirtyBits = nbBits == 0 ? 0 : ZSTD_highbit32((U32)nbBits) + 1;
return ZSTD_highbit32((U32)dictAndWindowSize - 1) + 1;
ZSTD_highbit32(tSize-1) + 1;
U32 const ofCode = ZSTD_highbit32(sequences[u].offBase);
offcodeMax = ZSTD_highbit32(maxOffset); /* Calculate minimum offset code required to represent maxOffset */
U32 const limitedSrcLog = limitedSrcSize > 1 ? ZSTD_highbit32(limitedSrcSize - 1) + 1 : 1;
U32 const hb = ZSTD_highbit32(newStat);
return (litLength > 63) ? ZSTD_highbit32(litLength) + LL_deltaCode : LL_Code[litLength];
return (mlBase > 127) ? ZSTD_highbit32(mlBase) + ML_deltaCode : ML_Code[mlBase];
int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offBase) + 1);
int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offBase) + 1);
int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)ofbCandidate)); /* raw approx */
int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offBase) + 4);
int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offBase) + 1);
int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offBase) + 1);
int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)ofbCandidate)); /* raw approx */
int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offBase) + 7);
int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offBase) + 1);
int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)ofbCandidate)); /* raw approx */
int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offBase) + 4);
int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offBase) + 1);
int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)ofbCandidate)); /* raw approx */
int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offBase) + 7);
if ( (4*(int)(matchLength-bestLength)) > (int)(ZSTD_highbit32(curr-matchIndex+1) - ZSTD_highbit32((U32)offsetPtr[0]+1)) ) {
if ( (4*(int)(matchLength-bestLength)) > (int)(ZSTD_highbit32(curr - matchIndex + 1) - ZSTD_highbit32((U32)*offBasePtr)) )
return ZSTD_downscaleStats(table, lastEltIndex, ZSTD_highbit32(factor), base_1guaranteed);
U32 const offCode = ZSTD_highbit32(offBase);
{ U32 const offCode = ZSTD_highbit32(offBase);
return (ZSTD_highbit32(stat+1) * BITCOST_MULTIPLIER);
U32 const hb = ZSTD_highbit32(stat);
size_t const bitsConsumed = lastByte ? 8 - ZSTD_highbit32(lastByte) : 0;
*value = (int)ZSTD_highbit32((U32)dctx->maxWindowSize);
assert(ZSTD_highbit32((U32)maxOffbase) == STREAM_ACCUMULATOR_MIN);
tableDecode[u].nbBits = (BYTE) (tableLog - ZSTD_highbit32(nextState) );