Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\zstd\compress.c Create Date:2022-07-28 07:05:17
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_loadZstdDictionary(ZSTD_CCtx *cctx, const void *dict, size_t dictSize)

Type:size_t

Parameter:

TypeParameterName
ZSTD_CCtx *cctx
const void *dict
size_tdictSize

Brief:! ZSTD_loadZstdDictionary() :* assumptions : magic number supposed already checked* dictSize supposed > 8

2628  dictPtr = dict
2629  dictEnd = dictPtr + dictSize
2631  offcodeMaxValue = MaxOff
2633  dictPtr += 4
2634  dictID = If noDictIDFlag Then 0 Else ZSTD_readLE32(dictPtr)
2635  dictPtr += 4
2638  hufHeaderSize = HUF_readCTable_wksp(hufTable, 255, dictPtr, dictEnd - dictPtr, tmpCounters, size of tmpCounters )
2639  If Error Management Then Return -***************************************** Error codes handling(dictionary_corrupted)
2641  dictPtr += hufHeaderSize
2646  offcodeHeaderSize = -*************************************************************** FSE NCount encoding-decoding
2647  If Error Management Then Return -***************************************** Error codes handling(dictionary_corrupted)
2649  If offcodeLog > OffFSELog Then Return -***************************************** Error codes handling(dictionary_corrupted)
2654  dictPtr += offcodeHeaderSize
2659  matchlengthMaxValue = MaxML
2660  matchlengthHeaderSize = -*************************************************************** FSE NCount encoding-decoding
2661  If Error Management Then Return -***************************************** Error codes handling(dictionary_corrupted)
2663  If matchlengthLog > MLFSELog Then Return -***************************************** Error codes handling(dictionary_corrupted)
2670  dictPtr += matchlengthHeaderSize
2675  litlengthMaxValue = MaxLL
2676  litlengthHeaderSize = -*************************************************************** FSE NCount encoding-decoding
2677  If Error Management Then Return -***************************************** Error codes handling(dictionary_corrupted)
2679  If litlengthLog > LLFSELog Then Return -***************************************** Error codes handling(dictionary_corrupted)
2685  dictPtr += litlengthHeaderSize
2688  If dictPtr + 12 > dictEnd Then Return -***************************************** Error codes handling(dictionary_corrupted)
2690  rep[0] = ZSTD_readLE32(dictPtr + 0)
2691  rep[1] = ZSTD_readLE32(dictPtr + 4)
2692  rep[2] = ZSTD_readLE32(dictPtr + 8)
2693  dictPtr += 12
2696  dictContentSize = dictEnd - dictPtr
2697  offcodeMax = MaxOff
2698  If ( - 1 <= 128 - KB Then
2699  U32 const maxOffset = dictContentSize + 128 KB
2707  When u < 3 cycle
2715  flagStaticTables = 1
2716  flagStaticHufTable = HUF_repeat_valid
2717  Return : 0, or an error code
Caller
NameDescribe
ZSTD_compress_insertDictionary : 0, or an error code