Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\zstd\compress.c Create Date:2022-07-28 07:05:40
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: ZSTD_compressionParameters structure for a selected compression level, `srcSize` and `dictSize`.

Proto:ZSTD_compressionParameters ZSTD_getCParams(int compressionLevel, unsigned long long srcSize, size_t dictSize)

Type:ZSTD_compressionParameters

Parameter:

TypeParameterName
intcompressionLevel
unsigned long longsrcSize
size_tdictSize

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

3414  addedSize = If srcSize Then 0 Else 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  If compressionLevel <= 0 Then compressionLevel = -===== Pre-defined compression levels =====-
3419  If compressionLevel > ZSTD_MAX_CLEVEL Then compressionLevel = ZSTD_MAX_CLEVEL
3421  cp = ZSTD_defaultCParameters[tableID][compressionLevel]
3422  If -*************************************************************** Memory I/O Then
3423  If windowLog > ZSTD_WINDOWLOG_MAX Then windowLog = ZSTD_WINDOWLOG_MAX
3425  If chainLog > ZSTD_CHAINLOG_MAX Then chainLog = ZSTD_CHAINLOG_MAX
3427  If hashLog > ZSTD_HASHLOG_MAX Then hashLog = 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  Return cp
Caller
NameDescribe
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)