Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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),

Proto:ZSTD_compressionParameters ZSTD_adjustCParams(ZSTD_compressionParameters cPar, unsigned long long srcSize, size_t dictSize)

Type:ZSTD_compressionParameters

Parameter:

TypeParameterName
ZSTD_compressionParameterscPar
unsigned long longsrcSize
size_tdictSize
182  If srcSize + dictSize == 0 Then Return cPar
187  minSrcSize = If srcSize == 0 Then 500 Else 0
188  rSize = srcSize + dictSize + minSrcSize
189  If rSize < 1 << ZSTD_WINDOWLOG_MAX Then
191  If windowLog > srcLog Then windowLog = srcLog
195  If hashLog > windowLog Then hashLog = windowLog
198  cycleLog = ZSTD_cycleLog() :* condition for correct operation : hashLog > 1
199  If cycleLog > windowLog Then chainLog -= cycleLog - windowLog
203  If windowLog < ZSTD_WINDOWLOG_ABSOLUTEMIN Then windowLog = ZSTD_WINDOWLOG_ABSOLUTEMIN
206  Return cPar
Caller
NameDescribe
ZSTD_getCParams ZSTD_compressionParameters structure for a selected compression level, `srcSize` and `dictSize`.