Lines Matching refs:rankLast
261 U32 rankLast[HUF_TABLELOG_MAX+2]; in HUF_setMaxHeight() local
264 ZSTD_memset(rankLast, 0xF0, sizeof(rankLast)); in HUF_setMaxHeight()
270 rankLast[maxNbBits-currentNbBits] = (U32)pos; in HUF_setMaxHeight()
279 U32 const highPos = rankLast[nBitsToDecrease]; in HUF_setMaxHeight()
280 U32 const lowPos = rankLast[nBitsToDecrease-1]; in HUF_setMaxHeight()
291 assert(rankLast[nBitsToDecrease] != noSymbol || nBitsToDecrease == 1); in HUF_setMaxHeight()
293 … while ((nBitsToDecrease<=HUF_TABLELOG_MAX) && (rankLast[nBitsToDecrease] == noSymbol)) in HUF_setMaxHeight()
295 assert(rankLast[nBitsToDecrease] != noSymbol); in HUF_setMaxHeight()
298 huffNode[rankLast[nBitsToDecrease]].nbBits++; in HUF_setMaxHeight()
304 if (rankLast[nBitsToDecrease-1] == noSymbol) in HUF_setMaxHeight()
305 rankLast[nBitsToDecrease-1] = rankLast[nBitsToDecrease]; in HUF_setMaxHeight()
313 if (rankLast[nBitsToDecrease] == 0) /* special case, reached largest symbol */ in HUF_setMaxHeight()
314 rankLast[nBitsToDecrease] = noSymbol; in HUF_setMaxHeight()
316 rankLast[nBitsToDecrease]--; in HUF_setMaxHeight()
317 if (huffNode[rankLast[nBitsToDecrease]].nbBits != maxNbBits-nBitsToDecrease) in HUF_setMaxHeight()
318 rankLast[nBitsToDecrease] = noSymbol; /* this rank is now empty */ in HUF_setMaxHeight()
332 if (rankLast[1] == noSymbol) { in HUF_setMaxHeight()
336 rankLast[1] = (U32)(n+1); in HUF_setMaxHeight()
340 huffNode[ rankLast[1] + 1 ].nbBits--; in HUF_setMaxHeight()
341 rankLast[1]++; in HUF_setMaxHeight()