函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\zstd\compress.c Create Date:2022-07-27 08:03:25
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: ZSTD_compressionParameters structure for a selected compression level, `srcSize` and `dictSize`.

函数原型:ZSTD_compressionParameters ZSTD_getCParams(int compressionLevel, unsigned long long srcSize, size_t dictSize)

返回类型:ZSTD_compressionParameters

参数:

类型参数名称
intcompressionLevel
unsigned long longsrcSize
size_tdictSize

摘要:! ZSTD_getCParams() :* Size values are optional, provide 0 if not known or unused

3414  addedSize等于如果srcSize则0否则500
3415  U64 const rSize = srcSize + dictSize ? srcSize + dictSize + addedSize : (U64) - 1
3416  U32 const tableID = (rSize <= 256 KB) + (rSize <= 128 KB) + (rSize <= 16 KB)
3417  如果compressionLevel小于等于0则compressionLevel等于-===== Pre-defined compression levels =====-
3419  如果compressionLevel大于ZSTD_MAX_CLEVELcompressionLevel等于ZSTD_MAX_CLEVEL
3421  cp等于ZSTD_defaultCParameters[tableID][compressionLevel]
3422  如果-*************************************************************** Memory I/O
3423  如果windowLog大于ZSTD_WINDOWLOG_MAXwindowLog等于ZSTD_WINDOWLOG_MAX
3425  如果chainLog大于ZSTD_CHAINLOG_MAXchainLog等于ZSTD_CHAINLOG_MAX
3427  如果hashLog大于ZSTD_HASHLOG_MAXhashLog等于ZSTD_HASHLOG_MAX
3430  cp等于ZSTD_adjustCParams() :optimize `cPar` for a given input (`srcSize` and `dictSize`).mostly downsizing to reduce memory consumption and initialization.Both `srcSize` and `dictSize` are optional (use 0 if unknown),
3431  返回:cp
调用者
名称描述
ZSTD_getParams! ZSTD_getParams() :* same as ZSTD_getCParams(), but @return a `ZSTD_parameters` object (instead of `ZSTD_compressionParameters`).* All fields of `ZSTD_frameParameters` are set to default (0)