Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:HUF_readDTableX2_wksp

Proto:size_t HUF_readDTableX2_wksp(HUF_DTable *DTable, const void *src, size_t srcSize, void *workspace, size_t workspaceSize)

Type:size_t

Parameter:

TypeParameterName
HUF_DTable *DTable
const void *src
size_tsrcSize
void *workspace
size_tworkspaceSize
92  tableLog = 0
93  nbSymbols = 0
95  dtPtr = DTable + 1
96  dt = dtPtr
100  spaceUsed32 = 0
102  rankVal = workspace + spaceUsed32
103  spaceUsed32 += absolute limit of HUF_MAX_TABLELOG. Beyond that value, code does not work + 1
104  huffWeight = workspace + spaceUsed32
105  spaceUsed32 += @a is a power of 2 value (HUF_SYMBOLVALUE_MAX + 1, sizeof(U32)) >> 2
107  If spaceUsed32 << 2 > workspaceSize Then Return -***************************************** Error codes handling(tableLog_tooLarge)
109  workspace = workspace + spaceUsed32
110  workspaceSize -= spaceUsed32 << 2
115  iSize = : size read from `src` , or an error Code .
116  If HUF_isError(iSize) Then Return iSize
121  dtd = HUF_getDTableDesc(DTable)
122  If tableLog > maxTableLog + 1 Then Return -***************************************** Error codes handling(tableLog_tooLarge)
124  tableType = 0
125  tableLog = tableLog
126  No 3D Now!(DTable, & dtd, size of dtd )
131  nextRankStart = 0
132  When n < tableLog + 1 cycle
134  nextRankStart += rankVal[n] << n - 1
135  rankVal[n] = curr
142  When n < nbSymbols cycle
143  w = huffWeight[n]
144  length = 1 << w >> 1
147  byte = n
148  nbBits = tableLog + 1 - w
149  When u < rankVal[w] + length cycle dt[u] = D
151  rankVal[w] += length
155  Return iSize
Caller
NameDescribe
HUF_decompress1X2_DCtx_wksp
HUF_decompress4X2_DCtx_wksp