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:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:HUF_readDTableX4_wksp

Proto:size_t HUF_readDTableX4_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
485  dtd = HUF_getDTableDesc(DTable)
486  maxTableLog = maxTableLog
488  dtPtr = DTable + 1
489  dt = dtPtr
497  spaceUsed32 = 0
501  rankVal = workspace + spaceUsed32
502  spaceUsed32 += sizeof(rankValCol_t) * max configured tableLog (for static allocation); can be modified up to HUF_ABSOLUTEMAX_TABLELOG >> 2
503  rankStats = workspace + spaceUsed32
504  spaceUsed32 += max configured tableLog (for static allocation); can be modified up to HUF_ABSOLUTEMAX_TABLELOG + 1
505  rankStart0 = workspace + spaceUsed32
506  spaceUsed32 += max configured tableLog (for static allocation); can be modified up to HUF_ABSOLUTEMAX_TABLELOG + 2
507  sortedSymbol = workspace + spaceUsed32
508  spaceUsed32 += @a is a power of 2 value (sizeof(sortedSymbol_t) * (HUF_SYMBOLVALUE_MAX + 1), sizeof(U32)) >> 2
509  weightList = workspace + spaceUsed32
510  spaceUsed32 += @a is a power of 2 value (HUF_SYMBOLVALUE_MAX + 1, sizeof(U32)) >> 2
512  If spaceUsed32 << 2 > workspaceSize Then Return -***************************************** Error codes handling(tableLog_tooLarge)
514  workspace = workspace + spaceUsed32
515  workspaceSize -= spaceUsed32 << 2
517  rankStart = rankStart0 + 1
518  memset(rankStats, 0, sizeof(U32) * (2 * max configured tableLog (for static allocation); can be modified up to HUF_ABSOLUTEMAX_TABLELOG + 2 + 1))
521  If maxTableLog > max configured tableLog (for static allocation); can be modified up to HUF_ABSOLUTEMAX_TABLELOG Then Return -***************************************** Error codes handling(tableLog_tooLarge)
525  iSize = : size read from `src` , or an error Code .
526  If HUF_isError(iSize) Then Return iSize
530  If tableLog > maxTableLog Then Return -***************************************** Error codes handling(tableLog_tooLarge)
534  When rankStats[maxW] == 0 cycle
539  nextRankStart = 0
540  When w < maxW + 1 cycle
543  rankStart[w] = curr
545  rankStart[0] = nextRankStart
546  sizeOfSort = nextRankStart
552  When s < nbSymbols cycle
553  w = weightList[s]
554  r = rankStart[w]++
555  symbol = s
556  weight = w
558  rankStart[0] = 0
563  rankVal0 = rankVal[0]
565  rescale = maxTableLog - tableLog - 1
566  nextRankVal = 0
568  When w < maxW + 1 cycle
569  curr = nextRankVal
570  nextRankVal += rankStats[w] << w + rescale
571  rankVal0[w] = curr
575  minBits = tableLog + 1 - maxW
577  When consumed < maxTableLog - minBits + 1 cycle
580  When w < maxW + 1 cycle
581  rankValPtr[w] = rankVal0[w] >> consumed
587  HUF_fillDTableX4(dt, maxTableLog, sortedSymbol, sizeOfSort, rankStart0, rankVal, maxW, tableLog + 1)
589  tableLog = maxTableLog
590  tableType = 1
591  No 3D Now!(DTable, & dtd, size of dtd )
592  Return iSize
Caller
NameDescribe
HUF_decompress1X4_DCtx_wksp
HUF_decompress4X4_DCtx_wksp
ZSTD_loadEntropy : size of entropy tables read