Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\zstd\compress.c Create Date:2022-07-28 07:03:28
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:ZSTD_compressBlock_fast_generic

Proto:void ZSTD_compressBlock_fast_generic(ZSTD_CCtx *cctx, const void *src, size_t srcSize, const U32 mls)

Type:void

Parameter:

TypeParameterName
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 = base + lowestIndex
1019  iend = istart + srcSize
1020  ilimit = iend - HASH_READ_SIZE
1021  offset_1 = rep[0] , offset_2 = rep[1]
1022  offsetSaved = 0
1025  ip += ip == lowest
1027  maxRep = ip - lowest
1028  If offset_2 > maxRep Then offsetSaved = offset_2 , offset_2 = 0
1030  If offset_1 > maxRep Then offsetSaved = offset_1 , offset_1 = 0
1035  When ip < ilimit cycle
1037  h = ZSTD_hashPtr(ip, hBits, mls)
1038  curr = ip - base
1039  matchIndex = hashTable[h]
1040  match = base + matchIndex
1041  hashTable[h] = curr
1043  If offset_1 > 0 & ZSTD_read32(ip + 1 - offset_1) == ZSTD_read32(ip + 1) Then
1044  mLength = ZSTD_count(ip + 1 + 4, ip + 1 + 4 - offset_1, iend) + 4
1045  ip++
1047  Else
1051  Continue
1053  mLength = ZSTD_count(ip + 4, match + 4, iend) + 4
1054  offset = ip - match
1055  When ip > anchor & match > lowest && ip[ - 1] == match[ - 1] cycle
1056  ip--
1057  match--
1058  mLength++
1060  offset_2 = offset_1
1061  offset_1 = offset
1067  ip += mLength
1068  anchor = ip
1070  If ip <= ilimit Then
1072  hashTable[ZSTD_hashPtr(base + curr + 2, hBits, mls)] = curr + 2
1073  hashTable[ZSTD_hashPtr(ip - 2, hBits, mls)] = ip - 2 - base
1075  When ip <= ilimit && offset_2 > 0 & ZSTD_read32(ip) == ZSTD_read32(ip - offset_2) cycle
1093  repToConfirm[0] = If offset_1 Then offset_1 Else offsetSaved
1094  repToConfirm[1] = If offset_2 Then offset_2 Else offsetSaved
1098  lastLLSize = iend - anchor
1099  No 3D Now!(lit, anchor, lastLLSize)
1100  lit += lastLLSize
Caller
NameDescribe
ZSTD_compressBlock_fast