Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ZSTD_HcFindBestMatch_generic

Proto:size_t ZSTD_HcFindBestMatch_generic(ZSTD_CCtx *zc, const BYTE *const ip, const BYTE *const iLimit, size_t *offsetPtr, const U32 maxNbAttempts, const U32 mls, const U32 extDict)

Type:size_t

Parameter:

TypeParameterName
ZSTD_CCtx *zc Index table will be updated
const BYTE *constip
const BYTE *constiLimit
size_t *offsetPtr
const U32maxNbAttempts
const U32mls
const U32extDict
1823  chainTable = chainTable
1824  chainSize = 1 << chainLog
1825  chainMask = chainSize - 1
1826  base = base
1827  dictBase = dictBase
1828  dictLimit = dictLimit
1829  prefixStart = base + dictLimit
1830  dictEnd = dictBase + dictLimit
1831  lowLimit = lowLimit
1832  curr = ip - base
1833  minChain = If curr > chainSize Then curr - chainSize Else 0
1834  nbAttempts = maxNbAttempts
1835  ml = EQUAL_READ32 - 1
1838  matchIndex = ZSTD_insertAndFindFirstIndex( Index table will be updated , ip, mls)
1840  When matchIndex > lowLimit & nbAttempts > 0 cycle
1842  currMl = 0
1843  If Not extDict || matchIndex >= dictLimit Then
1844  match = base + matchIndex
1845  If match[ml] == ip[ml] Then currMl = ZSTD_count(ip, match, iLimit)
1847  Else
1854  If currMl > ml Then
1855  ml = currMl
1857  If ip + currMl == iLimit Then Break
1861  If matchIndex <= minChain Then Break
1863  matchIndex = Hash Chain(matchIndex, chainMask)
1866  Return ml
Caller
NameDescribe
ZSTD_HcFindBestMatch_selectMLS
ZSTD_HcFindBestMatch_extDict_selectMLS