Function report |
Source Code:lib\zstd\compress.c |
Create Date:2022-07-28 07:03:53 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: : nb of positions added
Proto:static U32 ZSTD_insertBt1(ZSTD_CCtx *zc, const BYTE *const ip, const U32 mls, const BYTE *const iend, U32 nbCompares, U32 extDict)
Type:U32
Parameter:
Type | Parameter | Name |
---|---|---|
ZSTD_CCtx * | zc | |
const BYTE *const | ip | assumed <= iend-8 . |
const U32 | mls | |
const BYTE *const | iend | |
U32 | nbCompares | |
U32 | extDict |
1565 | h = ZSTD_hashPtr( assumed <= iend-8 ., hashLog, mls) |
1566 | bt = chainTable |
1569 | matchIndex = hashTable[h] |
1570 | commonLengthSmaller = 0 , commonLengthLarger = 0 |
1575 | prefixStart = base + dictLimit |
1577 | curr = assumed <= iend-8 . - base |
1579 | smallerPtr = bt + 2 * (curr & btMask) |
1580 | largerPtr = smallerPtr + 1 |
1583 | matchEndIdx = curr + 8 |
1584 | bestLength = 8 |
1588 | When nbCompares-- && matchIndex > windowLow cycle |
1589 | nextPtr = bt + 2 * (matchIndex & btMask) |
1590 | matchLength = -************************************** shared macros(commonLengthSmaller, commonLengthLarger) |
1592 | If Not extDict || matchIndex + matchLength >= dictLimit Then |
1593 | match = base + matchIndex |
1594 | If match[matchLength] == assumed <= iend-8 .[matchLength] Then matchLength += ZSTD_count( assumed <= iend-8 . + matchLength + 1, match + matchLength + 1, iend) + 1 |
1596 | Else |
1597 | match = dictBase + matchIndex |
1598 | 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 |
1599 | If matchIndex + matchLength >= dictLimit Then match = base + matchIndex |
1603 | If matchLength > bestLength Then |
1604 | bestLength = matchLength |
1605 | If matchLength > matchEndIdx - matchIndex Then matchEndIdx = matchIndex + matchLength |
1609 | If assumed <= iend-8 . + matchLength == iend Then Break |
1612 | If match[matchLength] < assumed <= iend-8 .[matchLength] Then |
1614 | smallerPtr = matchIndex |
1615 | commonLengthSmaller = matchLength |
1616 | If matchIndex <= btLow Then |
1617 | smallerPtr = dummy32 |
1618 | Break |
1620 | smallerPtr = nextPtr + 1 |
1621 | matchIndex = nextPtr[1] |
1622 | Else |
1624 | largerPtr = matchIndex |
1625 | commonLengthLarger = matchLength |
1626 | If matchIndex <= btLow Then |
1631 | matchIndex = nextPtr[0] |
1635 | smallerPtr = largerPtr = 0 |
1636 | If bestLength > 384 Then Return -************************************** shared macros(192, (U32)(bestLength - 384)) |
1638 | If matchEndIdx > curr + 8 Then Return matchEndIdx - curr - 8 |
1640 | Return 1 |
Name | Describe |
---|---|
ZSTD_updateTree | |
ZSTD_updateTree_extDict |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |
Brief:ZSTD_insertBt1() : add one or multiple positions to tree.