Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:LZ4HC_InsertAndFindBestMatch

Proto:static inline __attribute__((__always_inline__)) int LZ4HC_InsertAndFindBestMatch(LZ4HC_CCtx_internal *hc4, const BYTE *ip, const BYTE *const iLimit, const BYTE **matchpos, const int maxNbAttempts)

Type:int

Parameter:

TypeParameterName
LZ4HC_CCtx_internal *hc4 Index table will be updated
const BYTE *ip
const BYTE *constiLimit
const BYTE **matchpos
const intmaxNbAttempts
106  chainTable = chainTable
107  HashTable = hashTable
108  base = All index relative to this position
109  dictBase = alternate base for extDict
110  dictLimit = low that point, need extDict
111  lowLimit = If low that point, no more dict + 64 * KB > ip - base Then low that point, no more dict Else ip - base - 64 * KB - 1
115  nbAttempts = maxNbAttempts
116  ml = 0
119  Update chains up to ip (excluded)
120  matchIndex = HashTable[LZ4HC_hashPtr(ip)]
122  When matchIndex >= lowLimit && nbAttempts cycle
124  nbAttempts--
125  If matchIndex >= dictLimit Then
126  match = base + matchIndex
128  If *(match + ml) == *(ip + ml) && LZ4_read32(match) == LZ4_read32(ip) Then
138  Else
141  If LZ4_read32(match) == LZ4_read32(ip) Then
162  matchIndex -= aster (matchIndex)
165  Return ml
Caller
NameDescribe
LZ4HC_compress_generic