函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ZSTD_compressBlock_doubleFast_generic

函数原型:void ZSTD_compressBlock_doubleFast_generic(ZSTD_CCtx *cctx, const void *src, size_t srcSize, const U32 mls)

返回类型:void

参数:

类型参数名称
ZSTD_CCtx *cctx
const void *src
size_tsrcSize
const U32mls
1256  hashLong等于hashTable
1257  hBitsL等于hashLog
1258  hashSmall等于chainTable
1259  hBitsS等于chainLog
1260  seqStorePtr等于seqStore的地址
1261  base等于base
1262  istart等于src
1263  ip等于istart
1264  anchor等于istart
1265  lowestIndex等于dictLimit
1266  lowest等于baselowestIndex
1267  iend等于istartsrcSize
1268  ilimit等于iendHASH_READ_SIZE
1269  offset_1等于rep[0], offset_2等于rep[1]
1270  offsetSaved等于0
1273  ip加等于ip恒等于lowest
1275  maxRep等于iplowest
1276  如果offset_2大于maxRepoffsetSaved等于offset_2, offset_2等于0
1278  如果offset_1大于maxRepoffsetSaved等于offset_1, offset_1等于0
1283 ip小于ilimit循环
1285  h2等于ZSTD_hashPtr(ip, hBitsL, 8)
1286  h等于ZSTD_hashPtr(ip, hBitsS, mls)
1287  curr等于ipbase
1288  matchIndexL等于hashLong[h2]
1289  matchIndexS等于hashSmall[h]
1290  matchLong等于basematchIndexL
1291  match等于basematchIndexS
1292  hashLong[h2]等于hashSmall[h]等于curr
1294  如果offset_1大于0按位与ZSTD_read32(ip + 1 - offset_1)恒等于ZSTD_read32(ip + 1)则
1295  mLength等于ZSTD_count(ip + 1 + 4, ip + 1 + 4 - offset_1, iend)加4
1296  ip自加
1298  否则
1300  如果matchIndexL大于lowestIndexZSTD_read64(matchLong)恒等于ZSTD_read64(ip)则
1301  mLength等于ZSTD_count(ip + 8, matchLong + 8, iend)加8
1302  offset等于ipmatchLong
1303 ip大于anchor按位与matchLong大于lowestip[ - 1]恒等于matchLong[ - 1]循环
1304  ip自减
1305  matchLong自减
1306  mLength自加
1308  否则如果matchIndexS大于lowestIndexZSTD_read32(match)恒等于ZSTD_read32(ip)则
1309  h3等于ZSTD_hashPtr(ip + 1, hBitsL, 8)
1310  matchIndex3等于hashLong[h3]
1311  match3等于basematchIndex3
1312  hashLong[h3]等于curr加1
1313  如果matchIndex3大于lowestIndexZSTD_read64(match3)恒等于ZSTD_read64(ip + 1)则
1314  mLength等于ZSTD_count(ip + 9, match3 + 8, iend)加8
1315  ip自加
1316  offset等于ipmatch3
1317 ip大于anchor按位与match3大于lowestip[ - 1]恒等于match3[ - 1]循环
1318  ip自减
1319  match3自减
1320  mLength自加
1322  否则
1323  mLength等于ZSTD_count(ip + 4, match + 4, iend)加4
1324  offset等于ipmatch
1325 ip大于anchor按位与match大于lowestip[ - 1]恒等于match[ - 1]循环
1326  ip自减
1327  match自减
1328  mLength自加
1331  否则
1332  ip加等于ipanchor右移control skip over incompressible data 位的值加1
1333  继续下一循环
1336  offset_2等于offset_1
1337  offset_1等于offset
1343  ip加等于mLength
1344  anchor等于ip
1346  如果ip小于等于ilimit
1348  hashLong[ZSTD_hashPtr(base + curr + 2, hBitsL, 8)]等于hashSmall[ZSTD_hashPtr(base + curr + 2, hBitsS, mls)]等于curr加2
1350  hashLong[ZSTD_hashPtr(ip - 2, hBitsL, 8)]等于hashSmall[ZSTD_hashPtr(ip - 2, hBitsS, mls)]等于ip减2减base
1353 ip小于等于ilimitoffset_2大于0按位与ZSTD_read32(ip)恒等于ZSTD_read32(ip - offset_2)循环
1372  repToConfirm[0]等于如果offset_1offset_1否则offsetSaved
1373  repToConfirm[1]等于如果offset_2offset_2否则offsetSaved
1377  lastLLSize等于iendanchor
1378  内存复制(lit, anchor, lastLLSize)
1379  lit加等于lastLLSize
调用者
名称描述
ZSTD_compressBlock_doubleFast