Lines Matching refs:rankLast
277 U32 rankLast[HUF_TABLELOG_MAX+2]; in HUF_setMaxHeight() local
280 ZSTD_memset(rankLast, 0xF0, sizeof(rankLast)); in HUF_setMaxHeight()
286 rankLast[maxNbBits-currentNbBits] = (U32)pos; in HUF_setMaxHeight()
295 U32 const highPos = rankLast[nBitsToDecrease]; in HUF_setMaxHeight()
296 U32 const lowPos = rankLast[nBitsToDecrease-1]; in HUF_setMaxHeight()
307 assert(rankLast[nBitsToDecrease] != noSymbol || nBitsToDecrease == 1); in HUF_setMaxHeight()
309 … while ((nBitsToDecrease<=HUF_TABLELOG_MAX) && (rankLast[nBitsToDecrease] == noSymbol)) in HUF_setMaxHeight()
311 assert(rankLast[nBitsToDecrease] != noSymbol); in HUF_setMaxHeight()
314 huffNode[rankLast[nBitsToDecrease]].nbBits++; in HUF_setMaxHeight()
320 if (rankLast[nBitsToDecrease-1] == noSymbol) in HUF_setMaxHeight()
321 rankLast[nBitsToDecrease-1] = rankLast[nBitsToDecrease]; in HUF_setMaxHeight()
329 if (rankLast[nBitsToDecrease] == 0) /* special case, reached largest symbol */ in HUF_setMaxHeight()
330 rankLast[nBitsToDecrease] = noSymbol; in HUF_setMaxHeight()
332 rankLast[nBitsToDecrease]--; in HUF_setMaxHeight()
333 if (huffNode[rankLast[nBitsToDecrease]].nbBits != maxNbBits-nBitsToDecrease) in HUF_setMaxHeight()
334 rankLast[nBitsToDecrease] = noSymbol; /* this rank is now empty */ in HUF_setMaxHeight()
348 if (rankLast[1] == noSymbol) { in HUF_setMaxHeight()
352 rankLast[1] = (U32)(n+1); in HUF_setMaxHeight()
356 huffNode[ rankLast[1] + 1 ].nbBits--; in HUF_setMaxHeight()
357 rankLast[1]++; in HUF_setMaxHeight()