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