Function report |
Source Code:lib\zstd\huf_compress.c |
Create Date:2022-07-28 07:02:31 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:HUF_buildCTable_wksp
Proto:size_t HUF_buildCTable_wksp(HUF_CElt *tree, const U32 *count, U32 maxSymbolValue, U32 maxNbBits, void *workSpace, size_t wkspSize)
Type:size_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| HUF_CElt * | tree | |
| const U32 * | count | |
| U32 | maxSymbolValue | |
| U32 | maxNbBits | |
| void * | workSpace | |
| size_t | wkspSize |
| 430 | If wkspSize < sizeof(huffNodeTable) Then Return -***************************************** Error codes handling(GENERIC) |
| 432 | If maxNbBits == 0 Then maxNbBits = ableLog by default, when not specified |
| 434 | If maxSymbolValue > HUF_SYMBOLVALUE_MAX Then Return -***************************************** Error codes handling(GENERIC) |
| 436 | memset(huffNode0, 0, sizeof(huffNodeTable)) |
| 439 | HUF_sort(huffNode, count, maxSymbolValue) |
| 442 | nonNullRank = maxSymbolValue |
| 444 | nonNullRank-- |
| 445 | lowS = nonNullRank |
| 450 | nodeNb++ |
| 451 | lowS -= 2 |
| 454 | count = 1U << 31 |
| 462 | nodeNb++ |
| 466 | nbBits = 0 |
| 469 | When n <= nonNullRank cycle nbBits = nbBits + 1 |
| 478 | U16 valPerRank[13] = {0} |
| 479 | If maxNbBits > max configured tableLog (for static allocation); can be modified up to HUF_ABSOLUTEMAX_TABLELOG Then Return -***************************************** Error codes handling(GENERIC) |
| 481 | When n <= nonNullRank cycle nbPerRank[nbBits]++ |
| 492 | When n <= maxSymbolValue cycle nbBits = nbBits |
| 494 | When n <= maxSymbolValue cycle val = valPerRank[nbBits]++ |
| 498 | Return maxNbBits |
| Name | Describe |
|---|---|
| HUF_compress_internal | `workSpace` must a table of at least 1024 unsigned |
| 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 |