totalCost 298 lib/zstd/huf_compress.c int totalCost = 0; totalCost 303 lib/zstd/huf_compress.c totalCost += baseCost - (1 << (largestBits - huffNode[n].nbBits)); totalCost 311 lib/zstd/huf_compress.c totalCost >>= (largestBits - maxNbBits); /* note : totalCost is necessarily a multiple of baseCost */ totalCost 331 lib/zstd/huf_compress.c while (totalCost > 0) { totalCost 332 lib/zstd/huf_compress.c U32 nBitsToDecrease = BIT_highbit32(totalCost) + 1; totalCost 351 lib/zstd/huf_compress.c totalCost -= 1 << (nBitsToDecrease - 1); totalCost 364 lib/zstd/huf_compress.c while (totalCost < 0) { /* Sometimes, cost correction overshoot */ totalCost 371 lib/zstd/huf_compress.c totalCost++; totalCost 376 lib/zstd/huf_compress.c totalCost++;