函数逻辑报告 |
Source Code:lib\zstd\zstd_opt.h |
Create Date:2022-07-27 08:02:15 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:-************************************** Binary Tree search
函数原型:static U32 ZSTD_insertBtAndGetAllMatches(ZSTD_CCtx *zc, const BYTE *const ip, const BYTE *const iLimit, U32 nbCompares, const U32 mls, U32 extDict, ZSTD_match_t *matches, const U32 minMatchLen)
返回类型:U32
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| ZSTD_CCtx * | zc | |
| const BYTE *const | ip | |
| const BYTE *const | iLimit | |
| U32 | nbCompares | |
| const U32 | mls | |
| U32 | extDict | |
| ZSTD_match_t * | matches | |
| const U32 | minMatchLen |
| 241 | h等于ZSTD_hashPtr(ip, hashLog, mls) |
| 243 | matchIndex等于hashTable[h] |
| 244 | bt等于chainTable |
| 247 | commonLengthSmaller等于0, commonLengthLarger等于0 |
| 251 | prefixStart等于base加dictLimit |
| 254 | smallerPtr等于bt加2乘curr按位与btMask的值 |
| 256 | matchEndIdx等于curr加8 |
| 258 | mnum等于0 |
| 261 | bestLength等于minMatchLen减1 |
| 263 | 如果minMatch恒等于3则 |
| 265 | 如果matchIndex3大于windowLow且curr减matchIndex3小于1左移18位则 |
| 267 | currMl等于0 |
| 268 | 如果非extDict或matchIndex3大于等于dictLimit则 |
| 269 | match等于base加matchIndex3 |
| 270 | 如果match[bestLength]恒等于ip[bestLength]则currMl等于ZSTD_count(ip, match, iLimit) |
| 272 | 否则 |
| 273 | match等于dictBase加matchIndex3 |
| 280 | 如果currMl大于bestLength则 |
| 281 | bestLength等于currMl |
| 284 | mnum自加 |
| 295 | 当nbCompares自减且matchIndex大于windowLow循环 |
| 296 | nextPtr等于bt加2乘matchIndex按位与btMask的值 |
| 297 | matchLength等于-************************************** shared macros(commonLengthSmaller, commonLengthLarger) |
| 300 | 如果非extDict或matchIndex加matchLength大于等于dictLimit则 |
| 301 | match等于base加matchIndex |
| 302 | 如果match[matchLength]恒等于ip[matchLength]则 |
| 303 | matchLength加等于ZSTD_count(ip + matchLength + 1, match + matchLength + 1, iLimit)加1 |
| 305 | 否则 |
| 306 | match等于dictBase加matchIndex |
| 307 | 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 |
| 308 | 如果matchIndex加matchLength大于等于dictLimit则match等于base加matchIndex |
| 312 | 如果matchLength大于bestLength则 |
| 325 | 如果match[matchLength]小于ip[matchLength]则 |
| 327 | smallerPtr等于matchIndex |
| 329 | 如果matchIndex小于等于btLow则 |
| 330 | smallerPtr等于dummy32 |
| 331 | 退出 |
| 333 | smallerPtr等于nextPtr加1 |
| 334 | matchIndex等于nextPtr[1] |
| 335 | 否则 |
| 348 | smallerPtr等于largerPtr等于0 |
| 350 | update : |
| 351 | nextToUpdate等于如果matchEndIdx大于curr加8则matchEndIdx减8否则curr加1 |
| 352 | 返回:mnum |
| 名称 | 描述 |
|---|---|
| ZSTD_BtGetAllMatches | Tree updater, providing best match |
| ZSTD_BtGetAllMatches_extDict | Tree updater, providing best match |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |