函数逻辑报告 |
Source Code:lib\zstd\compress.c |
Create Date:2022-07-27 08:01:37 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:ZSTD_insertBtAndFindBestMatch
函数原型:static size_t ZSTD_insertBtAndFindBestMatch(ZSTD_CCtx *zc, const BYTE *const ip, const BYTE *const iend, size_t *offsetPtr, U32 nbCompares, const U32 mls, U32 extDict)
返回类型:size_t
参数:
类型 | 参数 | 名称 |
---|---|---|
ZSTD_CCtx * | zc | |
const BYTE *const | ip | |
const BYTE *const | iend | |
size_t * | offsetPtr | |
U32 | nbCompares | |
const U32 | mls | |
U32 | extDict |
1648 | h等于ZSTD_hashPtr(ip, hashLog, mls) |
1649 | bt等于chainTable |
1652 | matchIndex等于hashTable[h] |
1653 | commonLengthSmaller等于0, commonLengthLarger等于0 |
1658 | prefixStart等于base加dictLimit |
1662 | smallerPtr等于bt加2乘curr按位与btMask的值 |
1664 | matchEndIdx等于curr加8 |
1666 | bestLength等于0 |
1670 | 当nbCompares自减且matchIndex大于windowLow循环 |
1671 | nextPtr等于bt加2乘matchIndex按位与btMask的值 |
1672 | matchLength等于-************************************** shared macros(commonLengthSmaller, commonLengthLarger) |
1675 | 如果非extDict或matchIndex加matchLength大于等于dictLimit则 |
1676 | match等于base加matchIndex |
1677 | 如果match[matchLength]恒等于ip[matchLength]则matchLength加等于ZSTD_count(ip + matchLength + 1, match + matchLength + 1, iend)加1 |
1679 | 否则 |
1680 | match等于dictBase加matchIndex |
1681 | matchLength加等于ZSTD_count_2segments() :* can count match length with `ip` & `match` in 2 different segments.* convention : on reaching mEnd, match count continue starting from iStart |
1682 | 如果matchIndex加matchLength大于等于dictLimit则match等于base加matchIndex |
1686 | 如果matchLength大于bestLength则 |
1689 | 如果4乘matchLength减bestLength的差大于====== common function ======减====== common function ======则bestLength等于matchLength, offsetPtr等于ZSTD_REP_MOVE加curr减matchIndex |
1691 | 如果ip加matchLength恒等于iend则退出 |
1695 | 如果match[matchLength]小于ip[matchLength]则 |
1697 | smallerPtr等于matchIndex |
1699 | 如果matchIndex小于等于btLow则 |
1700 | smallerPtr等于dummy32 |
1701 | 退出 |
1703 | smallerPtr等于nextPtr加1 |
1704 | matchIndex等于nextPtr[1] |
1705 | 否则 |
1718 | smallerPtr等于largerPtr等于0 |
1720 | nextToUpdate等于如果matchEndIdx大于curr加8则matchEndIdx减8否则curr加1 |
1721 | 返回:bestLength |
名称 | 描述 |
---|---|
ZSTD_BtFindBestMatch | ZSTD_BtFindBestMatch() : Tree updater, providing best match |
ZSTD_BtFindBestMatch_extDict | Tree updater, providing best match |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |