函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ZSTD_compressBlock_fast_generic

函数原型:void ZSTD_compressBlock_fast_generic(ZSTD_CCtx *cctx, const void *src, size_t srcSize, const U32 mls)

返回类型:void

参数:

类型参数名称
ZSTD_CCtx *cctx
const void *src
size_tsrcSize
const U32mls
1010  hashTable等于hashTable
1011  hBits等于hashLog
1012  seqStorePtr等于seqStore的地址
1013  base等于base
1014  istart等于src
1015  ip等于istart
1016  anchor等于istart
1017  lowestIndex等于dictLimit
1018  lowest等于baselowestIndex
1019  iend等于istartsrcSize
1020  ilimit等于iendHASH_READ_SIZE
1021  offset_1等于rep[0], offset_2等于rep[1]
1022  offsetSaved等于0
1025  ip加等于ip恒等于lowest
1027  maxRep等于iplowest
1028  如果offset_2大于maxRepoffsetSaved等于offset_2, offset_2等于0
1030  如果offset_1大于maxRepoffsetSaved等于offset_1, offset_1等于0
1035 ip小于ilimit循环
1037  h等于ZSTD_hashPtr(ip, hBits, mls)
1038  curr等于ipbase
1039  matchIndex等于hashTable[h]
1040  match等于basematchIndex
1041  hashTable[h]等于curr
1043  如果offset_1大于0按位与ZSTD_read32(ip + 1 - offset_1)恒等于ZSTD_read32(ip + 1)则
1044  mLength等于ZSTD_count(ip + 1 + 4, ip + 1 + 4 - offset_1, iend)加4
1045  ip自加
1047  否则
1049  如果matchIndex小于等于lowestIndexZSTD_read32(match)不等于ZSTD_read32(ip)则
1050  ip加等于ipanchor右移control skip over incompressible data 位的值加1
1051  继续下一循环
1053  mLength等于ZSTD_count(ip + 4, match + 4, iend)加4
1054  offset等于ipmatch
1055 ip大于anchor按位与match大于lowestip[ - 1]恒等于match[ - 1]循环
1056  ip自减
1057  match自减
1058  mLength自加
1060  offset_2等于offset_1
1061  offset_1等于offset
1067  ip加等于mLength
1068  anchor等于ip
1070  如果ip小于等于ilimit
1072  hashTable[ZSTD_hashPtr(base + curr + 2, hBits, mls)]等于curr加2
1073  hashTable[ZSTD_hashPtr(ip - 2, hBits, mls)]等于ip减2减base
1075 ip小于等于ilimitoffset_2大于0按位与ZSTD_read32(ip)恒等于ZSTD_read32(ip - offset_2)循环
1093  repToConfirm[0]等于如果offset_1offset_1否则offsetSaved
1094  repToConfirm[1]等于如果offset_2offset_2否则offsetSaved
1098  lastLLSize等于iendanchor
1099  内存复制(lit, anchor, lastLLSize)
1100  lit加等于lastLLSize
调用者
名称描述
ZSTD_compressBlock_fast