Function report |
Source Code:lib\zstd\compress.c |
Create Date:2022-07-28 07:04:18 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:ZSTD_compressBlock_lazy_extDict_generic
Proto:void ZSTD_compressBlock_lazy_extDict_generic(ZSTD_CCtx *ctx, const void *src, size_t srcSize, const U32 searchMethod, const U32 depth)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
ZSTD_CCtx * | ctx | |
const void * | src | |
size_t | srcSize | |
const U32 | searchMethod | |
const U32 | depth |
2060 | seqStorePtr = &seqStore |
2068 | lowestIndex = lowLimit |
2069 | prefixStart = base + dictLimit |
2074 | maxSearches = 1 << searchLog |
2075 | mls = searchLength |
2077 | typedef size_t( * searchMax_f)(ZSTD_CCtx * zc, const BYTE * ip, const BYTE * iLimit, size_t * offsetPtr, U32 maxNbAttempts, U32 matchLengthSearch) |
2078 | searchMax = If searchMethod Then ZSTD_BtFindBestMatch_selectMLS_extDict Else ZSTD_HcFindBestMatch_extDict_selectMLS |
2083 | nextToUpdate3 = nextToUpdate |
2084 | ip += ip == prefixStart |
2088 | matchLength = 0 |
2089 | offset = 0 |
2098 | If dictLimit - 1 - repIndex >= 3 & repIndex > lowestIndex Then If ZSTD_read32(ip + 1) == ZSTD_read32(repMatch) Then |
2104 | If depth == 0 Then Go to _storeSequence |
2111 | offsetFound = 99999999 |
2112 | ml2 = searchMax(ctx, ip, iend, & offsetFound, maxSearches, mls) |
2113 | If ml2 > matchLength Then matchLength = ml2 , start = ip , offset = offsetFound |
2117 | If matchLength < EQUAL_READ32 Then |
2118 | ip += ( ip - anchor >> control skip over incompressible data ) + 1 |
2119 | Continue |
2125 | ip++ |
2126 | curr++ |
2128 | If offset Then |
2132 | If dictLimit - 1 - repIndex >= 3 & repIndex > lowestIndex Then If ZSTD_read32(ip) == ZSTD_read32(repMatch) Then |
2136 | repLength = ZSTD_count_2segments() :* can count match length with `ip` & `match` in 2 different segments.* convention : on reaching mEnd, match count continue starting from iStart + EQUAL_READ32 |
2140 | gain1 = matchLength * 3 - ====== common function ====== + 1 |
2141 | If repLength >= EQUAL_READ32 && gain2 > gain1 Then matchLength = repLength , offset = 0 , start = ip |
2148 | offset2 = 99999999 |
2150 | gain2 = ml2 * 4 - ====== common function ====== |
2151 | gain1 = matchLength * 4 - ====== common function ====== + 4 |
2152 | If ml2 >= EQUAL_READ32 && gain2 > gain1 Then |
2160 | ip++ |
2161 | curr++ |
2163 | If offset Then |
2167 | If dictLimit - 1 - repIndex >= 3 & repIndex > lowestIndex Then If ZSTD_read32(ip) == ZSTD_read32(repMatch) Then |
2171 | repLength = ZSTD_count_2segments() :* can count match length with `ip` & `match` in 2 different segments.* convention : on reaching mEnd, match count continue starting from iStart + EQUAL_READ32 |
2175 | gain1 = matchLength * 4 - ====== common function ====== + 1 |
2176 | If repLength >= EQUAL_READ32 && gain2 > gain1 Then matchLength = repLength , offset = 0 , start = ip |
2183 | offset2 = 99999999 |
2185 | gain2 = ml2 * 4 - ====== common function ====== |
2186 | gain1 = matchLength * 4 - ====== common function ====== + 7 |
2187 | If ml2 >= EQUAL_READ32 && gain2 > gain1 Then |
2193 | Break |
2197 | If offset Then |
2198 | matchIndex = start - base - offset - ZSTD_REP_MOVE |
2199 | match = If matchIndex < dictLimit Then dictBase + matchIndex Else base + matchIndex |
2200 | mStart = If matchIndex < dictLimit Then dictStart Else prefixStart |
2207 | offset_1 = offset - ZSTD_REP_MOVE |
2211 | _storeSequence : |
2214 | anchor = ip = start + matchLength |
2222 | If dictLimit - 1 - repIndex >= 3 & repIndex > lowestIndex Then If ZSTD_read32(ip) == ZSTD_read32(repMatch) Then |
2232 | ip += matchLength |
2234 | Continue |
2236 | Break |
2241 | repToConfirm[0] = offset_1 |
2242 | repToConfirm[1] = offset_2 |
Name | Describe |
---|---|
ZSTD_compressBlock_greedy_extDict | |
ZSTD_compressBlock_lazy_extDict | |
ZSTD_compressBlock_lazy2_extDict | |
ZSTD_compressBlock_btlazy2_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 |