Home
last modified time | relevance | path

Searched refs:huffNode (Results 1 – 2 of 2) sorted by relevance

/src/sys/contrib/openzfs/module/zstd/lib/compress/
H A Dhuf_compress.c377 static U32 HUF_setMaxHeight(nodeElt* huffNode, U32 lastNonNull, U32 targetNbBits) in HUF_setMaxHeight() argument
379 const U32 largestBits = huffNode[lastNonNull].nbBits; in HUF_setMaxHeight()
394 while (huffNode[n].nbBits > targetNbBits) { in HUF_setMaxHeight()
395 totalCost += baseCost - (1 << (largestBits - huffNode[n].nbBits)); in HUF_setMaxHeight()
396 huffNode[n].nbBits = (BYTE)targetNbBits; in HUF_setMaxHeight()
400 assert(huffNode[n].nbBits <= targetNbBits); in HUF_setMaxHeight()
402 while (huffNode[n].nbBits == targetNbBits) --n; in HUF_setMaxHeight()
419 if (huffNode[pos].nbBits >= currentNbBits) continue; in HUF_setMaxHeight()
420 currentNbBits = huffNode[pos].nbBits; /* < targetNbBits */ in HUF_setMaxHeight()
437 { U32 const highTotal = huffNode[highPos].count; in HUF_setMaxHeight()
[all …]
/src/sys/contrib/zstd/lib/compress/
H A Dhuf_compress.c308 static U32 HUF_setMaxHeight(nodeElt* huffNode, U32 lastNonNull, U32 maxNbBits) in HUF_setMaxHeight() argument
310 const U32 largestBits = huffNode[lastNonNull].nbBits; in HUF_setMaxHeight()
323 while (huffNode[n].nbBits > maxNbBits) { in HUF_setMaxHeight()
324 totalCost += baseCost - (1 << (largestBits - huffNode[n].nbBits)); in HUF_setMaxHeight()
325 huffNode[n].nbBits = (BYTE)maxNbBits; in HUF_setMaxHeight()
329 assert(huffNode[n].nbBits <= maxNbBits); in HUF_setMaxHeight()
331 while (huffNode[n].nbBits == maxNbBits) --n; in HUF_setMaxHeight()
348 if (huffNode[pos].nbBits >= currentNbBits) continue; in HUF_setMaxHeight()
349 currentNbBits = huffNode[pos].nbBits; /* < maxNbBits */ in HUF_setMaxHeight()
366 { U32 const highTotal = huffNode[highPos].count; in HUF_setMaxHeight()
[all …]