Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ZSTD_execSequence

Proto:size_t ZSTD_execSequence(BYTE *op, BYTE *const oend, seq_t sequence, const BYTE **litPtr, const BYTE *const litLimit, const BYTE *const base, const BYTE *const vBase, const BYTE *const dictEnd)

Type:size_t

Parameter:

TypeParameterName
BYTE *op
BYTE *constoend
seq_tsequence
const BYTE **litPtr
const BYTE *constlitLimit
const BYTE *constbase
const BYTE *constvBase
const BYTE *constdictEnd
1010  oLitEnd = op + litLength
1011  sequenceLength = litLength + matchLength
1012  oMatchEnd = op + sequenceLength
1013  oend_w = oend - ! ZSTD_wildcopy() :* custom version of memcpy(), can copy up to 7 bytes too many (8 bytes if length==0)
1014  iLitEnd = litPtr + litLength
1015  match = oLitEnd - offset
1018  If oMatchEnd > oend Then Return -***************************************** Error codes handling(dstSize_tooSmall)
1020  If iLitEnd > litLimit Then Return -***************************************** Error codes handling(corruption_detected)
1022  If oLitEnd > oend_w Then Return ZSTD_execSequenceLast7(op, oend, sequence, litPtr, litLimit, base, vBase, dictEnd)
1026  -******************************************** Shared functions to include for inlining
1027  If litLength > 8 Then ZSTD_wildcopy(op + 8, ( * litPtr) + 8, litLength - 8)
1030  op = oLitEnd
1031  litPtr = iLitEnd
1034  If offset > oLitEnd - base Then
1036  If offset > oLitEnd - vBase Then Return -***************************************** Error codes handling(corruption_detected)
1038  match = dictEnd + match - base
1039  If match + matchLength <= dictEnd Then
1041  Return sequenceLength
1045  length1 = dictEnd - match
1047  op = oLitEnd + length1
1048  matchLength -= length1
1049  match = base
1050  If op > oend_w || matchLength < MINMATCH Then
1052  When i < matchLength cycle op[i] = match[i]
1054  Return sequenceLength
1061  If offset < 8 Then
1063  static const U32 dec32table[] = {0, 1, 2, 1, 4, 4, 4, 4}
1064  static const int dec64table[] = {8, 8, 8, 7, 8, 9, 10, 11}
1065  sub2 = dec64table[offset]
1066  op[0] = match[0]
1067  op[1] = match[1]
1068  op[2] = match[2]
1069  op[3] = match[3]
1070  match += dec32table[offset]
1071  _******************************************************** Memory operations
1072  match -= sub2
1073  Else
1074  -******************************************** Shared functions to include for inlining
1076  op += 8
1077  match += 8
1079  If oMatchEnd > oend - 16 - MINMATCH Then
1080  If op < oend_w Then
1082  match += oend_w - op
1083  op = oend_w
1085  When op < oMatchEnd cycle
1086  op++ = match++
1087  Else
1088  ZSTD_wildcopy(op, match, (ptrdiff_t)matchLength - 8)
1090  Return sequenceLength
Caller
NameDescribe
ZSTD_decompressSequences