Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: : count of most numerous element

Proto:size_t FSE_count_simple(unsigned *count, unsigned *maxSymbolValuePtr, const void *src, size_t srcSize)

Type:size_t

Parameter:

TypeParameterName
unsigned *count
unsigned *maxSymbolValuePtr
const void *src
size_tsrcSize

Brief:! 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 = ip + srcSize
328  maxSymbolValue = maxSymbolValuePtr
329  max = 0
331  memset(count, 0, (maxSymbolValue + 1) * size of count )
332  If srcSize == 0 Then
333  maxSymbolValuePtr = 0
334  Return 0
337  When ip < end cycle
338  count[ * ip++]++
340  When Not count[maxSymbolValue] cycle
341  maxSymbolValue--
342  maxSymbolValuePtr = maxSymbolValue
346  When s <= maxSymbolValue cycle If count[s] > max Then
348  max = count[s]
351  Return max
Caller
NameDescribe
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