Function report |
Source Code:lib\zstd\fse_compress.c |
Create Date:2022-07-28 07:01:56 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:FSE_writeNCount_generic
Proto:static size_t FSE_writeNCount_generic(void *header, size_t headerBufferSize, const short *normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, unsigned writeIsSafe)
Type:size_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| void * | header | |
| size_t | headerBufferSize | |
| const short * | normalizedCounter | |
| unsigned | maxSymbolValue | |
| unsigned | tableLog | |
| unsigned | writeIsSafe |
| 208 | oend = ostart + headerBufferSize |
| 215 | charnum = 0 |
| 216 | previous0 = 0 |
| 218 | bitStream = 0 |
| 219 | bitCount = 0 |
| 221 | bitStream += tableLog - FSE_MIN_TABLELOG << bitCount |
| 222 | bitCount += 4 |
| 230 | If previous0 Then |
| 232 | When Not normalizedCounter[charnum] cycle |
| 233 | charnum++ |
| 235 | start += 24 |
| 237 | If Not writeIsSafe && out > oend - 2 Then Return -***************************************** Error codes handling(dstSize_tooSmall) |
| 241 | out += 2 |
| 242 | bitStream >>= 16 |
| 250 | bitCount += 2 |
| 251 | If bitCount > 16 Then |
| 252 | If Not writeIsSafe && out > oend - 2 Then Return -***************************************** Error codes handling(dstSize_tooSmall) |
| 256 | out += 2 |
| 257 | bitStream >>= 16 |
| 258 | bitCount -= 16 |
| 262 | count = normalizedCounter[charnum++] |
| 265 | count++ |
| 272 | If remaining < 1 Then Return -***************************************** Error codes handling(GENERIC) |
| 277 | If bitCount > 16 Then |
| 278 | If Not writeIsSafe && out > oend - 2 Then Return -***************************************** Error codes handling(dstSize_tooSmall) |
| 282 | out += 2 |
| 283 | bitStream >>= 16 |
| 284 | bitCount -= 16 |
| 289 | If Not writeIsSafe && out > oend - 2 Then Return -***************************************** Error codes handling(dstSize_tooSmall) |
| 295 | If charnum > maxSymbolValue + 1 Then Return -***************************************** Error codes handling(GENERIC) |
| Name | Describe |
|---|---|
| FSE_writeNCount |
| 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 |