Function report |
Source Code:lib\zstd\compress.c |
Create Date:2022-07-28 07:04:09 |
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_generic
Proto:void ZSTD_compressBlock_lazy_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 |
1899 | seqStorePtr = &seqStore |
1907 | maxSearches = 1 << searchLog |
1908 | mls = searchLength |
1910 | typedef size_t( * searchMax_f)(ZSTD_CCtx * zc, const BYTE * ip, const BYTE * iLimit, size_t * offsetPtr, U32 maxNbAttempts, U32 matchLengthSearch) |
1911 | searchMax = If searchMethod Then ZSTD_BtFindBestMatch_selectMLS Else ZSTD_HcFindBestMatch_selectMLS |
1912 | offset_1 = rep[0] , offset_2 = rep[1] , savedOffset = 0 |
1916 | nextToUpdate3 = nextToUpdate |
1919 | If offset_2 > maxRep Then savedOffset = offset_2 , offset_2 = 0 |
1921 | If offset_1 > maxRep Then savedOffset = offset_1 , offset_1 = 0 |
1927 | matchLength = 0 |
1928 | offset = 0 |
1932 | If offset_1 > 0 & ZSTD_read32(ip + 1) == ZSTD_read32(ip + 1 - offset_1) Then |
1934 | matchLength = ZSTD_count(ip + 1 + EQUAL_READ32, ip + 1 + EQUAL_READ32 - offset_1, iend) + EQUAL_READ32 |
1935 | If depth == 0 Then Go to _storeSequence |
1941 | offsetFound = 99999999 |
1942 | ml2 = searchMax(ctx, ip, iend, & offsetFound, maxSearches, mls) |
1943 | If ml2 > matchLength Then matchLength = ml2 , start = ip , offset = offsetFound |
1947 | If matchLength < EQUAL_READ32 Then |
1948 | ip += ( ip - anchor >> control skip over incompressible data ) + 1 |
1949 | Continue |
1955 | ip++ |
1956 | If offset && offset_1 > 0 & ZSTD_read32(ip) == ZSTD_read32(ip - offset_1) Then |
1957 | mlRep = ZSTD_count(ip + EQUAL_READ32, ip + EQUAL_READ32 - offset_1, iend) + EQUAL_READ32 |
1959 | gain1 = matchLength * 3 - ====== common function ====== + 1 |
1960 | If mlRep >= EQUAL_READ32 && gain2 > gain1 Then matchLength = mlRep , offset = 0 , start = ip |
1964 | offset2 = 99999999 |
1966 | gain2 = ml2 * 4 - ====== common function ====== |
1967 | gain1 = matchLength * 4 - ====== common function ====== + 4 |
1968 | If ml2 >= EQUAL_READ32 && gain2 > gain1 Then |
1976 | ip++ |
1977 | If offset && offset_1 > 0 & ZSTD_read32(ip) == ZSTD_read32(ip - offset_1) Then |
1978 | ml2 = ZSTD_count(ip + EQUAL_READ32, ip + EQUAL_READ32 - offset_1, iend) + EQUAL_READ32 |
1980 | gain1 = matchLength * 4 - ====== common function ====== + 1 |
1981 | If ml2 >= EQUAL_READ32 && gain2 > gain1 Then matchLength = ml2 , offset = 0 , start = ip |
1985 | offset2 = 99999999 |
1987 | gain2 = ml2 * 4 - ====== common function ====== |
1988 | gain1 = matchLength * 4 - ====== common function ====== + 7 |
1989 | If ml2 >= EQUAL_READ32 && gain2 > gain1 Then |
1995 | Break |
2004 | If offset Then |
2008 | start-- |
2009 | matchLength++ |
2012 | offset_1 = offset - ZSTD_REP_MOVE |
2016 | _storeSequence : |
2020 | anchor = ip = start + matchLength |
2024 | When ip <= ilimit && offset_2 > 0 & ZSTD_read32(ip) == ZSTD_read32(ip - offset_2) cycle |
2026 | matchLength = ZSTD_count(ip + EQUAL_READ32, ip + EQUAL_READ32 - offset_2, iend) + EQUAL_READ32 |
2031 | ip += matchLength |
2033 | Continue |
2038 | repToConfirm[0] = If offset_1 Then offset_1 Else savedOffset |
2039 | repToConfirm[1] = If offset_2 Then offset_2 Else savedOffset |
Name | Describe |
---|---|
ZSTD_compressBlock_btlazy2 | |
ZSTD_compressBlock_lazy2 | |
ZSTD_compressBlock_lazy | |
ZSTD_compressBlock_greedy |
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 |