Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:! ZSTD_resetCCtx_advanced() :note : `params` must be validated

Proto:static size_t ZSTD_resetCCtx_advanced(ZSTD_CCtx *zc, ZSTD_parameters params, U64 frameContentSize, ZSTD_compResetPolicy_e const crp)

Type:size_t

Parameter:

TypeParameterName
ZSTD_CCtx *zc
ZSTD_parametersparams
U64frameContentSize
ZSTD_compResetPolicy_e constcrp
244  If crp == ZSTDcrp_continue Then If ZSTD_equivalentParams(params, params) Then
246  flagStaticTables = 0
247  flagStaticHufTable = *< Cannot use the previous table
248  Return ! ZSTD_continueCCtx() :reuse CCtx without reset (note : requires no dictionary)
252  blockSize = -************************************** shared macros(Define for static allocation , (size_t)1 << windowLog)
253  divider = If searchLength == 3 Then 3 Else 4
254  maxNbSeq = blockSize / divider
255  tokenSpace = blockSize + 11 * maxNbSeq
256  chainSize = If strategy == ZSTD_fast Then 0 Else 1 << chainLog
257  hSize = 1 << hashLog
258  hashLog3 = If searchLength > 3 Then 0 Else -************************************** shared macros(ZSTD_HASHLOG3_MAX, windowLog)
259  h3Size = 1 << hashLog3
260  tableSpace = ( chainSize + hSize + h3Size) * sizeof(U32)
269  If workSpaceSize < neededSpace Then
278  If crp != ZSTDcrp_noMemset Then memset(workSpace, 0, tableSpace)
280  xxh64_reset( & xxhState, 0)
281  hashLog3 = hashLog3
282  hashTable = workSpace
283  chainTable = hashTable + hSize
284  hashTable3 = chainTable + chainSize
285  ptr = hashTable3 + h3Size
286  hufTable = ptr
287  flagStaticTables = 0
288  flagStaticHufTable = *< Cannot use the previous table
289  ptr = ptr + 256
291  nextToUpdate = 1
292  nextSrc = NULL
293  base = NULL
294  dictBase = NULL
295  dictLimit = 0
296  lowLimit = 0
297  params = params
298  blockSize = blockSize
306  If strategy == ZSTD_btopt || strategy == ZSTD_btopt2 Then
307  litFreq = ptr
308  litLengthFreq = litFreq + (1 << Litbits)
311  ptr = offCodeFreq + MaxOff + 1
312  matchTable = ptr
314  priceTable = ptr
316  litLengthSum = 0
318  sequencesStart = ptr
319  ptr = sequencesStart + maxNbSeq
320  llCode = ptr
321  mlCode = llCode + maxNbSeq
322  ofCode = mlCode + maxNbSeq
323  litStart = ofCode + maxNbSeq
325  stage = ZSTDcs_init
326  dictID = 0
327  loadedDictEnd = 0
329  Return 0
Caller
NameDescribe
ZSTD_copyCCtx : 0, or an error code
ZSTD_compressBegin_internal : 0, or an error code