Lines Matching refs:rankLast
338 U32 rankLast[HUF_TABLELOG_MAX+2]; in HUF_setMaxHeight() local
341 ZSTD_memset(rankLast, 0xF0, sizeof(rankLast)); in HUF_setMaxHeight()
347 rankLast[maxNbBits-currentNbBits] = (U32)pos; in HUF_setMaxHeight()
356 U32 const highPos = rankLast[nBitsToDecrease]; in HUF_setMaxHeight()
357 U32 const lowPos = rankLast[nBitsToDecrease-1]; in HUF_setMaxHeight()
368 assert(rankLast[nBitsToDecrease] != noSymbol || nBitsToDecrease == 1); in HUF_setMaxHeight()
370 … while ((nBitsToDecrease<=HUF_TABLELOG_MAX) && (rankLast[nBitsToDecrease] == noSymbol)) in HUF_setMaxHeight()
372 assert(rankLast[nBitsToDecrease] != noSymbol); in HUF_setMaxHeight()
375 huffNode[rankLast[nBitsToDecrease]].nbBits++; in HUF_setMaxHeight()
381 if (rankLast[nBitsToDecrease-1] == noSymbol) in HUF_setMaxHeight()
382 rankLast[nBitsToDecrease-1] = rankLast[nBitsToDecrease]; in HUF_setMaxHeight()
390 if (rankLast[nBitsToDecrease] == 0) /* special case, reached largest symbol */ in HUF_setMaxHeight()
391 rankLast[nBitsToDecrease] = noSymbol; in HUF_setMaxHeight()
393 rankLast[nBitsToDecrease]--; in HUF_setMaxHeight()
394 if (huffNode[rankLast[nBitsToDecrease]].nbBits != maxNbBits-nBitsToDecrease) in HUF_setMaxHeight()
395 rankLast[nBitsToDecrease] = noSymbol; /* this rank is now empty */ in HUF_setMaxHeight()
409 if (rankLast[1] == noSymbol) { in HUF_setMaxHeight()
413 rankLast[1] = (U32)(n+1); in HUF_setMaxHeight()
417 huffNode[ rankLast[1] + 1 ].nbBits--; in HUF_setMaxHeight()
418 rankLast[1]++; in HUF_setMaxHeight()