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

Name:Decode one bit. In some versions, this function has been splitted in three* functions so that the compiler is supposed to be able to more easily avoid* an extra branch. In this particular version of the LZMA decoder, this

Proto:static __always_inline int rc_bit(struct rc_dec *rc, uint16_t *prob)

Type:int

Parameter:

TypeParameterName
struct rc_dec *rc
uint16_t *prob
502  Read the next input byte if needed.
503  bound = (range >> RC_BIT_MODEL_TOTAL_BITS) * prob
504  If code < bound Then
505  range = bound
506  prob += RC_BIT_MODEL_TOTAL - prob >> RC_MOVE_BITS
507  bit = 0
508  Else
509  range -= bound
510  code -= bound
511  prob -= prob >> RC_MOVE_BITS
512  bit = 1
515  Return bit
Caller
NameDescribe
rc_bittreeDecode a bittree starting from the most significant bit.
rc_bittree_reverseDecode a bittree starting from the least significant bit.
lzma_literalDecode a literal (one 8-bit byte)
lzma_lenDecode the length of the match into s->lzma.len.
lzma_rep_matchDecode a repeated match. The distance is one of the four most recently* seen matches. The distance will be stored in s->lzma.rep0.
lzma_mainLZMA decoder core