Function report |
Source Code:lib\zstd\huf_compress.c |
Create Date:2022-07-28 07:02:26 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:HUF_setMaxHeight
Proto:static U32 HUF_setMaxHeight(nodeElt *huffNode, U32 lastNonNull, U32 maxNbBits)
Type:U32
Parameter:
Type | Parameter | Name |
---|---|---|
nodeElt * | huffNode | |
U32 | lastNonNull | |
U32 | maxNbBits |
292 | largestBits = nbBits |
293 | If largestBits <= maxNbBits Then Return largestBits |
298 | totalCost = 0 |
299 | baseCost = 1 << largestBits - maxNbBits |
300 | n = lastNonNull |
308 | n-- |
311 | totalCost >>= largestBits - maxNbBits |
315 | noSymbol = 0xF0F0F0F0 |
322 | currNbBits = maxNbBits |
324 | If nbBits >= currNbBits Then Continue |
326 | currNbBits = nbBits |
327 | rankLast[maxNbBits - currNbBits] = pos |
332 | nBitsToDecrease = -*************************************************************** Internal functions + 1 |
333 | When nBitsToDecrease > 1 cycle |
334 | highPos = rankLast[nBitsToDecrease] |
335 | lowPos = rankLast[nBitsToDecrease - 1] |
349 | When nBitsToDecrease <= max configured tableLog (for static allocation); can be modified up to HUF_ABSOLUTEMAX_TABLELOG && rankLast[nBitsToDecrease] == noSymbol cycle |
350 | nBitsToDecrease++ |
351 | totalCost -= 1 << nBitsToDecrease - 1 |
352 | If rankLast[nBitsToDecrease - 1] == noSymbol Then rankLast[nBitsToDecrease - 1] = rankLast[nBitsToDecrease] |
354 | nbBits++ |
355 | If rankLast[nBitsToDecrease] == 0 Then rankLast[nBitsToDecrease] = noSymbol |
357 | Else |
358 | rankLast[nBitsToDecrease]-- |
359 | If nbBits != maxNbBits - nBitsToDecrease Then rankLast[nBitsToDecrease] = noSymbol |
381 | Return maxNbBits |
Name | Describe |
---|---|
HUF_buildCTable_wksp |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |