函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\zstd\huf_compress.c Create Date:2022-07-27 08:00:05
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:HUF_buildCTable_wksp

函数原型:size_t HUF_buildCTable_wksp(HUF_CElt *tree, const U32 *count, U32 maxSymbolValue, U32 maxNbBits, void *workSpace, size_t wkspSize)

返回类型:size_t

参数:

类型参数名称
HUF_CElt *tree
const U32 *count
U32maxSymbolValue
U32maxNbBits
void *workSpace
size_twkspSize
422  huffNode0等于workSpace
423  huffNode等于huffNode0加1
426  nodeNb等于HUF_buildCTable_wksp() :* Same as HUF_buildCTable(), but using externally allocated scratch buffer.* `workSpace` must be aligned on 4-bytes boundaries, and be at least as large as a table of 1024 unsigned.
430  如果wkspSize小于sizeof(huffNodeTable)则返回:-***************************************** Error codes handling(GENERIC)
432  如果maxNbBits恒等于0则maxNbBits等于ableLog by default, when not specified
434  如果maxSymbolValue大于HUF_SYMBOLVALUE_MAX则返回:-***************************************** Error codes handling(GENERIC)
436  memset(huffNode0, 0, sizeof(huffNodeTable))
439  HUF_sort(huffNode, count, maxSymbolValue)
442  nonNullRank等于maxSymbolValue
443 count恒等于0循环
444  nonNullRank自减
445  lowS等于nonNullRank
446  nodeRoot等于nodeNblowS减1
447  lowN等于nodeNb
448  count等于countcount
449  parent等于parent等于nodeNb
450  nodeNb自加
451  lowS减等于2
452 n小于等于nodeRoot循环count等于1U左移30位
454  count等于1U左移31位
457 nodeNb小于等于nodeRoot循环
458  n1等于如果count小于countlowS自减否则lowN自加
459  n2等于如果count小于countlowS自减否则lowN自加
460  count等于countcount
461  parent等于parent等于nodeNb
462  nodeNb自加
466  nbBits等于0
467 n大于等于HUF_buildCTable_wksp() :* Same as HUF_buildCTable(), but using externally allocated scratch buffer.* `workSpace` must be aligned on 4-bytes boundaries, and be at least as large as a table of 1024 unsigned.循环nbBits等于nbBits加1
469 n小于等于nonNullRank循环nbBits等于nbBits加1
473  maxNbBits等于HUF_setMaxHeight(huffNode, nonNullRank, maxNbBits)
477  U16 nbPerRank[13] = {0}
478  U16 valPerRank[13] = {0}
479  如果maxNbBits大于max configured tableLog (for static allocation); can be modified up to HUF_ABSOLUTEMAX_TABLELOG 则返回:-***************************************** Error codes handling(GENERIC)
481 n小于等于nonNullRank循环nbPerRank[nbBits]自加
485  min等于0
486 n大于0循环
487  valPerRank[n]等于min
488  min加等于nbPerRank[n]
489  min右移等于1位
492 n小于等于maxSymbolValue循环nbBits等于nbBits
494 n小于等于maxSymbolValue循环val等于valPerRank[nbBits]自加
498  返回:maxNbBits
调用者
名称描述
HUF_compress_internal`workSpace` must a table of at least 1024 unsigned