函数逻辑报告 |
Source Code:lib\zstd\compress.c |
Create Date:2022-07-27 08:00:41 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:ZSTD_compressLiterals
函数原型:static size_t ZSTD_compressLiterals(ZSTD_CCtx *zc, void *dst, size_t dstCapacity, const void *src, size_t srcSize)
返回类型:size_t
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| ZSTD_CCtx * | zc | |
| void * | dst | |
| size_t | dstCapacity | |
| const void * | src | |
| size_t | srcSize |
| 484 | minGain等于ZSTD_minGain(srcSize) |
| 487 | singleStream等于srcSize小于256 |
| 488 | hType等于set_compressed |
| 494 | minLitSize等于如果flagStaticHufTable恒等于HUF_repeat_valid则6否则small ? don't even attempt compression (speed opt) |
| 495 | 如果srcSize小于等于minLitSize则返回:ZSTD_noCompressLiterals(dst, dstCapacity, src, srcSize) |
| 499 | 如果dstCapacity小于lhSize加1则返回:-***************************************** Error codes handling(dstSize_tooSmall) |
| 502 | repeat等于flagStaticHufTable |
| 503 | preferRepeat等于如果strategy小于ZSTD_lazy则srcSize小于等于1024否则0 |
| 504 | 如果repeat恒等于HUF_repeat_valid且lhSize恒等于3则singleStream等于1 |
| 506 | cLitSize等于如果singleStream则HUF_compress1X_repeat(ostart + lhSize, dstCapacity - lhSize, src, srcSize, 255, 11, tmpCounters, tmpCounters的长度, hufTable, & repeat, preferRepeat)否则HUF_compress4X_repeat(ostart + lhSize, dstCapacity - lhSize, src, srcSize, 255, 11, tmpCounters, tmpCounters的长度, hufTable, & repeat, preferRepeat) |
| 510 | 如果repeat不等于*< Cannot use the previous table 则 |
| 511 | hType等于set_repeat |
| 513 | 否则 |
| 520 | 返回:ZSTD_noCompressLiterals(dst, dstCapacity, src, srcSize) |
| 522 | 如果cLitSize恒等于1则 |
| 524 | 返回:ZSTD_compressRleLiteralsBlock(dst, dstCapacity, src, srcSize) |
| 531 | lhc等于hType加非singleStream左移2位的值加srcSize左移4位的值加cLitSize左移14位的值 |
| 532 | ZSTD_writeLE24(ostart, lhc) |
| 533 | 退出 |
| 541 | 默认 |
| 545 | ZSTD_writeLE32(ostart, lhc) |
| 547 | 退出 |
| 名称 | 描述 |
|---|---|
| ZSTD_compressSequences_internal |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |