Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: : 0, or an error code

Proto:static size_t ZSTD_loadDictionaryContent(ZSTD_CCtx *zc, const void *src, size_t srcSize)

Type:size_t

Parameter:

TypeParameterName
ZSTD_CCtx *zc
const void *src
size_tsrcSize

Brief:! ZSTD_loadDictionaryContent() :

2559  ip = src
2560  iend = ip + srcSize
2563  lowLimit = dictLimit
2564  dictLimit = nextSrc - base
2565  dictBase = base
2566  base += ip - nextSrc
2567  nextToUpdate = dictLimit
2568  loadedDictEnd = If forceWindow Then 0 Else iend - base
2570  nextSrc = iend
2571  If srcSize <= HASH_READ_SIZE Then Return 0
2575  Case strategy == ZSTD_fast
2575  -************************************** Fast Scan
2575  Break
2577  Case strategy == ZSTD_dfast
2577  -************************************** Double Fast
2577  Break
2579  Case strategy == ZSTD_greedy
2580  Case strategy == ZSTD_lazy
2581  Case strategy == ZSTD_lazy2
2582  If srcSize >= HASH_READ_SIZE Then ZSTD_insertAndFindFirstIndex(zc, iend - HASH_READ_SIZE, searchLength)
2584  Break
2586  Case strategy == ZSTD_btlazy2
2587  Case strategy == ZSTD_btopt
2588  Case strategy == ZSTD_btopt2
2589  If srcSize >= HASH_READ_SIZE Then ZSTD_updateTree(zc, iend - HASH_READ_SIZE, iend, 1 << searchLog, searchLength)
2591  Break
2593  Default
2594  Return -***************************************** Error codes handling(GENERIC)
2597  nextToUpdate = iend - base
2598  Return 0
Caller
NameDescribe
ZSTD_loadZstdDictionary : 0, or an error code
ZSTD_compress_insertDictionary : 0, or an error code