Function report |
Source Code:lib\zstd\fse_compress.c |
Create Date:2022-07-28 07:02:05 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Secondary normalization method.To be used when primary method fails.
Proto:static size_t FSE_normalizeM2(short *norm, U32 tableLog, const unsigned *count, size_t total, U32 maxSymbolValue)
Type:size_t
Parameter:
Type | Parameter | Name |
---|---|---|
short * | norm | |
U32 | tableLog | |
const unsigned * | count | |
size_t | total | |
U32 | maxSymbolValue |
521 | NOT_YET_ASSIGNED = -2 |
523 | distributed = 0 |
527 | lowThreshold = total >> tableLog |
530 | When s <= maxSymbolValue cycle |
535 | If count[s] <= lowThreshold Then |
548 | norm[s] = NOT_YET_ASSIGNED |
550 | ToDistribute = (1 << tableLog) - distributed |
552 | If total / ToDistribute > lowOne Then |
554 | lowOne = total * 3 / ToDistribute * 2 |
555 | When s <= maxSymbolValue cycle |
563 | ToDistribute = (1 << tableLog) - distributed |
566 | If distributed == maxSymbolValue + 1 Then |
574 | norm[maxV] += ToDistribute |
575 | Return 0 |
578 | If total == 0 Then |
580 | When ToDistribute > 0 cycle If norm[s] > 0 Then |
582 | ToDistribute--, norm[s]++ |
583 | Return 0 |
591 | When s <= maxSymbolValue cycle |
592 | If norm[s] == NOT_YET_ASSIGNED Then |
605 | Return 0 |
Name | Describe |
---|---|
FSE_normalizeCount |
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 |