Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Repeat given number of bytes from the given distance. If the distance is* invalid, false is returned. On success, true is returned and *len is* updated to indicate how many bytes were left to be repeated.

Proto:static bool dict_repeat(struct dictionary *dict, uint32_t *len, uint32_t dist)

Type:bool

Parameter:

TypeParameterName
struct dictionary *dict
uint32_t *len
uint32_tdist
351  If dist >= How full dictionary is. This is used to detect corrupt input that* would read beyond the beginning of the uncompressed stream. || dist >= Size of the dictionary as specified in Block Header. This is used* together with "full" to detect corrupt input that would make us* read beyond the beginning of the uncompressed stream. Then Return false
354  left = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(size_t, Write limit; we don't write to buf[limit] or later bytes. - Position in buf , * len)
355  len -= left
357  back = Position in buf - dist - 1
358  If dist >= Position in buf Then back += End of the dictionary buffer. In multi-call mode, this is* the same as the dictionary size. In single-call mode, this* indicates the size of the output buffer.
361  Do
362  Beginning of the history buffer [Position in buf ++] = Beginning of the history buffer [back++]
363  If back == End of the dictionary buffer. In multi-call mode, this is* the same as the dictionary size. In single-call mode, this* indicates the size of the output buffer. Then back = 0
365  When --left > 0 cycle
367  If How full dictionary is. This is used to detect corrupt input that* would read beyond the beginning of the uncompressed stream. < Position in buf Then How full dictionary is. This is used to detect corrupt input that* would read beyond the beginning of the uncompressed stream. = Position in buf
370  Return true
Caller
NameDescribe
lzma_mainLZMA decoder core