函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:`workSpace` must a table of at least 1024 unsigned

函数原型:static size_t HUF_compress_internal(void *dst, size_t dstSize, const void *src, size_t srcSize, unsigned maxSymbolValue, unsigned huffLog, unsigned singleStream, void *workSpace, size_t wkspSize, HUF_CElt *oldHufTable, HUF_repeat *repeat, int preferRepeat)

返回类型:size_t

参数:

类型参数名称
void *dst
size_tdstSize
const void *src
size_tsrcSize
unsignedmaxSymbolValue
unsignedhuffLog
unsignedsingleStream
void *workSpace
size_twkspSize
HUF_CElt *oldHufTable
HUF_repeat *repeat
intpreferRepeat
656  ostart等于dst
657  oend等于ostartdstSize
658  op等于ostart
661  countSize等于sizeof(U32)乘HUF_SYMBOLVALUE_MAX加1的和
663  CTableSize等于sizeof(HUF_CElt)乘HUF_SYMBOLVALUE_MAX加1的和
666  如果wkspSize小于sizeof(huffNodeTable)加countSizeCTableSize则返回:-***************************************** Error codes handling(GENERIC)
668  如果非srcSize则返回:0
670  如果非dstSize则返回:0
672  如果srcSize大于< maximum input size for a single block compressed with HUF_compress 则返回:-***************************************** Error codes handling(srcSize_wrong)
674  如果huffLog大于max configured tableLog (for static allocation); can be modified up to HUF_ABSOLUTEMAX_TABLELOG 则返回:-***************************************** Error codes handling(tableLog_tooLarge)
676  如果非maxSymbolValuemaxSymbolValue等于HUF_SYMBOLVALUE_MAX
678  如果非huffLoghuffLog等于ableLog by default, when not specified
681  count等于workSpace
682  workSpace等于workSpacecountSize
683  wkspSize减等于countSize
684  CTable等于workSpace
685  workSpace等于workSpaceCTableSize
686  wkspSize减等于CTableSize
689  如果preferRepeatrepeatrepeat恒等于HUF_repeat_valid
690  返回:HUF_compressCTable_internal(ostart, op, oend, src, srcSize, singleStream, oldHufTable)
695  CHECK_V_F(largest, FSE_count_wksp() :* Same as FSE_count(), but using an externally provided scratch buffer.* `workSpace` size must be table of >= `1024` unsigned )
696  如果largest恒等于srcSize
697  * ostart = )
698  返回:1
700  如果largest小于等于srcSize右移7位的值加1则返回:0
705  如果repeatrepeat恒等于*< Can use the previous table but it must be checked. Note : The previous table must have been constructed by HUF_compress{1, 4}X_repeat 且非HUF_validateCTable(oldHufTable, count, maxSymbolValue)则
706  repeat等于*< Cannot use the previous table
709  如果preferRepeatrepeatrepeat不等于*< Cannot use the previous table
710  返回:HUF_compressCTable_internal(ostart, op, oend, src, srcSize, singleStream, oldHufTable)
714  huffLog等于Utils
716  CHECK_V_F(maxBits, HUF_buildCTable_wksp(CTable, count, maxSymbolValue, huffLog, workSpace, wkspSize))
717  huffLog等于maxBits
719  memset(CTable + maxSymbolValue + 1, 0, CTableSize - (maxSymbolValue + 1) * sizeof(HUF_CElt))
724  CHECK_V_F(hSize, : size of saved CTable )
729  如果oldSize小于等于hSizenewSizehSize加12大于等于srcSize
734  如果hSize加12ul大于等于srcSize
735  返回:0
737  op加等于hSize
738  如果repeat
741  如果oldHufTable
745  返回:HUF_compressCTable_internal(ostart, op, oend, src, srcSize, singleStream, CTable)
调用者
名称描述
HUF_compress1X_wksp
HUF_compress1X_repeat
HUF_compress4X_wksp
HUF_compress4X_repeat