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:45
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Decode and validate LZMA properties (lc/lp/pb) and calculate the bit masks* from the decoded lp and pb values. On success, the LZMA decoder state is* reset and true is returned.

Proto:static bool lzma_props(struct xz_dec_lzma2 *s, uint8_t props)

Type:bool

Parameter:

TypeParameterName
struct xz_dec_lzma2 *s
uint8_tprops
801  If props > ( 4 * 5 + 4) * 9 + 8 Then Return false
804  (1 << pb) - 1 = 0
805  When props >= 9 * 5 cycle
806  props -= 9 * 5
807  ++ (1 << pb) - 1
810  (1 << pb) - 1 = (1 << (1 << pb) - 1 ) - 1
812  (1 << lp) - 1 = 0
813  When props >= 9 cycle
814  props -= 9
815  ++ (1 << lp) - 1
818  * LZMA properties or related bit masks (number of literal * context bits, a mask dervied from the number of literal * position bits, and a mask dervied from the number * position bits) = props
820  If * LZMA properties or related bit masks (number of literal * context bits, a mask dervied from the number of literal * position bits, and a mask dervied from the number * position bits) + (1 << lp) - 1 > 4 Then Return false
823  (1 << lp) - 1 = (1 << (1 << lp) - 1 ) - 1
825  Reset the LZMA decoder and range decoder state. Dictionary is nore reset* here, because LZMA state may be reset without resetting the dictionary.
827  Return true
Caller
NameDescribe
xz_dec_lzma2_runTake care of the LZMA2 control layer, and forward the job of actual LZMA* decoding or copying of uncompressed chunks to other functions.