函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: : count of most numerous element

函数原型:size_t FSE_count_simple(unsigned *count, unsigned *maxSymbolValuePtr, const void *src, size_t srcSize)

返回类型:size_t

参数:

类型参数名称
unsigned *count
unsigned *maxSymbolValuePtr
const void *src
size_tsrcSize

摘要:! FSE_count_simpleThis function counts byte values within `src`, and store the histogram into table `count`.It doesn't use any additional memory.But this function is unsafe : it doesn't check that all values within `src` can fit into `count`.For this reason, prefer using a table `count` with 256 elements.

326  ip等于src
327  end等于ipsrcSize
328  maxSymbolValue等于maxSymbolValuePtr
329  max等于0
331  memset(count, 0, (maxSymbolValue + 1) * count的长度)
332  如果srcSize恒等于0则
333  maxSymbolValuePtr等于0
334  返回:0
337 ip小于end循环
338  count[ * ip++]自加
340  当非count[maxSymbolValue]循环
341  maxSymbolValue自减
342  maxSymbolValuePtr等于maxSymbolValue
346 s小于等于maxSymbolValue循环如果count[s]大于max
348  max等于count[s]
351  返回:max
调用者
名称描述
FSE_countFast_wkspFSE_countFast_wksp() :* Same as FSE_countFast(), but using an externally provided scratch buffer.* `workSpace` size must be table of >= `1024` unsigned
HUF_compressWeights_wksp