Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:LZ4HC_encodeSequence

Proto:static inline __attribute__((__always_inline__)) int LZ4HC_encodeSequence(const BYTE **ip, BYTE **op, const BYTE **anchor, int matchLength, const BYTE *const match, limitedOutput_directive limitedOutputBuffer, BYTE *oend)

Type:int

Parameter:

TypeParameterName
const BYTE **ip
BYTE **op
const BYTE **anchor
intmatchLength
const BYTE *constmatch
limitedOutput_directivelimitedOutputBuffer
BYTE *oend
275  length = ip - anchor
276  token = op++
278  If limitedOutputBuffer && op + (length >> 8) + length + 2 + 1 + LASTLITERALS > oend Then
282  Return 1
284  If length >= RUN_MASK Then
287  token = RUN_MASK << ML_BITS
288  len = length - RUN_MASK
289  When len > 254 cycle *op++ = 255
291  *op++ = len
292  Else token = length << ML_BITS
296  stomized variant of memcpy,* which can overwrite up to 7 bytes beyond dstEnd
297  op += length
300  LZ4_writeLE16( * op, (U16)( * ip - match))
301  op += 2
304  length = matchLength - -************************************* Constants
306  If limitedOutputBuffer && op + (length >> 8) + 1 + LASTLITERALS > oend Then
310  Return 1
313  If length >= ML_MASK Then
314  token += ML_MASK
315  length -= ML_MASK
317  When length > 509 cycle
318  *op++ = 255
319  *op++ = 255
322  If length > 254 Then
323  length -= 255
324  *op++ = 255
327  *op++ = length
328  Else token += length
332  ip += matchLength
333  anchor = ip
335  Return 0
Caller
NameDescribe
LZ4HC_compress_generic