函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: : nb of positions added

函数原型:static U32 ZSTD_insertBt1(ZSTD_CCtx *zc, const BYTE *const ip, const U32 mls, const BYTE *const iend, U32 nbCompares, U32 extDict)

返回类型:U32

参数:

类型参数名称
ZSTD_CCtx *zc
const BYTE *constip assumed <= iend-8 .
const U32mls
const BYTE *constiend
U32nbCompares
U32extDict

摘要:ZSTD_insertBt1() : add one or multiple positions to tree.

1563  hashTable等于hashTable
1564  hashLog等于hashLog
1565  h等于ZSTD_hashPtr( assumed <= iend-8 ., hashLog, mls)
1566  bt等于chainTable
1567  btLog等于chainLog减1
1568  btMask等于1左移btLog位的值减1
1569  matchIndex等于hashTable[h]
1570  commonLengthSmaller等于0, commonLengthLarger等于0
1571  base等于base
1572  dictBase等于dictBase
1573  dictLimit等于dictLimit
1574  dictEnd等于dictBasedictLimit
1575  prefixStart等于basedictLimit
1577  curr等于 assumed <= iend-8 .base
1578  btLow等于如果btMask大于等于curr则0否则currbtMask
1579  smallerPtr等于bt加2乘curr按位与btMask的值
1580  largerPtr等于smallerPtr加1
1582  windowLow等于lowLimit
1583  matchEndIdx等于curr加8
1584  bestLength等于8
1586  hashTable[h]等于curr
1588 nbCompares自减且matchIndex大于windowLow循环
1589  nextPtr等于bt加2乘matchIndex按位与btMask的值
1590  matchLength等于-************************************** shared macros(commonLengthSmaller, commonLengthLarger)
1592  如果非extDictmatchIndexmatchLength大于等于dictLimit
1593  match等于basematchIndex
1596  否则
1597  match等于dictBasematchIndex
1599  如果matchIndexmatchLength大于等于dictLimitmatch等于basematchIndex
1603  如果matchLength大于bestLength
1604  bestLength等于matchLength
1609  如果 assumed <= iend-8 .matchLength恒等于iend退出
1614  smallerPtr等于matchIndex
1616  如果matchIndex小于等于btLow
1617  smallerPtr等于dummy32
1618  退出
1620  smallerPtr等于nextPtr加1
1621  matchIndex等于nextPtr[1]
1622  否则
1624  largerPtr等于matchIndex
1626  如果matchIndex小于等于btLow
1627  largerPtr等于dummy32
1628  退出
1630  largerPtr等于nextPtr
1631  matchIndex等于nextPtr[0]
1635  smallerPtr等于largerPtr等于0
1636  如果bestLength大于384则返回:-************************************** shared macros(192, (U32)(bestLength - 384))
1638  如果matchEndIdx大于curr加8则返回:matchEndIdxcurr减8
1640  返回:1
调用者
名称描述
ZSTD_updateTree
ZSTD_updateTree_extDict