函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\zstd\compress.c Create Date:2022-07-27 08:01:50
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:ZSTD_compressBlock_lazy_generic

函数原型:void ZSTD_compressBlock_lazy_generic(ZSTD_CCtx *ctx, const void *src, size_t srcSize, const U32 searchMethod, const U32 depth)

返回类型:void

参数:

类型参数名称
ZSTD_CCtx *ctx
const void *src
size_tsrcSize
const U32searchMethod
const U32depth
1899  seqStorePtr等于seqStore的地址
1900  istart等于src
1901  ip等于istart
1902  anchor等于istart
1903  iend等于istartsrcSize
1904  ilimit等于iend减8
1905  base等于basedictLimit
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等于如果searchMethodZSTD_BtFindBestMatch_selectMLS否则ZSTD_HcFindBestMatch_selectMLS
1912  offset_1等于rep[0], offset_2等于rep[1], savedOffset等于0
1915  ip加等于ip恒等于base
1916  nextToUpdate3等于nextToUpdate
1918  maxRep等于ipbase
1919  如果offset_2大于maxRepsavedOffset等于offset_2, offset_2等于0
1921  如果offset_1大于maxRepsavedOffset等于offset_1, offset_1等于0
1926 ip小于ilimit循环
1927  matchLength等于0
1928  offset等于0
1929  start等于ip加1
1932  如果offset_1大于0按位与ZSTD_read32(ip + 1)恒等于ZSTD_read32(ip + 1 - offset_1)则
1935  如果depth恒等于0则转到:_storeSequence
1941  offsetFound等于99999999
1943  如果ml2大于matchLengthmatchLength等于ml2, start等于ip, offset等于offsetFound
1947  如果matchLength小于EQUAL_READ32
1948  ip加等于ipanchor右移control skip over incompressible data 位的值加1
1949  继续下一循环
1953  如果depth大于等于1则当ip小于ilimit循环
1955  ip自加
1956  如果offsetoffset_1大于0按位与ZSTD_read32(ip)恒等于ZSTD_read32(ip - offset_1)则
1958  gain2等于mlRep乘3
1960  如果mlRep大于等于EQUAL_READ32gain2大于gain1matchLength等于mlRep, offset等于0, start等于ip
1964  offset2等于99999999
1965  ml2等于searchMax(ctx, ip, iend, & offset2, maxSearches, mls)
1968  如果ml2大于等于EQUAL_READ32gain2大于gain1
1969  matchLength等于ml2, offset等于offset2, start等于ip
1970  继续下一循环
1975  如果depth恒等于2且ip小于ilimit
1976  ip自加
1977  如果offsetoffset_1大于0按位与ZSTD_read32(ip)恒等于ZSTD_read32(ip - offset_1)则
1979  gain2等于ml2乘4
1981  如果ml2大于等于EQUAL_READ32gain2大于gain1matchLength等于ml2, offset等于0, start等于ip
1985  offset2等于99999999
1986  ml2等于searchMax(ctx, ip, iend, & offset2, maxSearches, mls)
1989  如果ml2大于等于EQUAL_READ32gain2大于gain1
1990  matchLength等于ml2, offset等于offset2, start等于ip
1991  继续下一循环
1995  退出
2004  如果offset
2005  当((start > anchor) && (start > base + offset - ZSTD_REP_MOVE) && (start[ - 1] == )))循环
2008  start自减
2009  matchLength自加
2011  offset_2等于offset_1
2012  offset_1等于offsetZSTD_REP_MOVE
2016  _storeSequence :
2018  litLength等于startanchor
2019  ! ZSTD_storeSeq() :Store a sequence (literal length, literals, offset code and match length code) into seqStore_t.`offsetCode` : distance to match, or 0 == repCode.`matchCode` : matchLength - MINMATCH
2020  anchor等于ip等于startmatchLength
2024 ip小于等于ilimitoffset_2大于0按位与ZSTD_read32(ip)恒等于ZSTD_read32(ip - offset_2)循环
2026  matchLength等于ZSTD_count(ip + EQUAL_READ32, ip + EQUAL_READ32 - offset_2, iend)加EQUAL_READ32
2027  offset等于offset_2
2028  offset_2等于offset_1
2029  offset_1等于offset
2030  ! ZSTD_storeSeq() :Store a sequence (literal length, literals, offset code and match length code) into seqStore_t.`offsetCode` : distance to match, or 0 == repCode.`matchCode` : matchLength - MINMATCH
2031  ip加等于matchLength
2032  anchor等于ip
2033  继续下一循环
2038  repToConfirm[0]等于如果offset_1offset_1否则savedOffset
2039  repToConfirm[1]等于如果offset_2offset_2否则savedOffset
2043  lastLLSize等于iendanchor
2044  内存复制(lit, anchor, lastLLSize)
2045  lit加等于lastLLSize
调用者
名称描述
ZSTD_compressBlock_btlazy2
ZSTD_compressBlock_lazy2
ZSTD_compressBlock_lazy
ZSTD_compressBlock_greedy