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

Name:The LZMA decoder assumes that if the input limit (s->rc

Proto:static bool lzma2_lzma(struct xz_dec_lzma2 *s, struct xz_buf *b)

Type:bool

Parameter:

TypeParameterName
struct xz_dec_lzma2 *s>temp.buf, which (hopefully) gets filled on the next call to this
struct xz_buf *b
851  in_avail = in_size - in_pos
852  If size > 0 || * Compressed size of LZMA chunk or compressed/uncompressed * size of uncompressed chunk (64 KiB at maximum) == 0 Then
853  tmp = 2 * Minimum number of usable input buffer to safely decode one LZMA symbol - size
854  If tmp > * Compressed size of LZMA chunk or compressed/uncompressed * size of uncompressed chunk (64 KiB at maximum) - size Then tmp = * Compressed size of LZMA chunk or compressed/uncompressed * size of uncompressed chunk (64 KiB at maximum) - size
856  If tmp > in_avail Then tmp = in_avail
859  No 3D Now!(buf + size, in + in_pos, tmp)
862  memzero(buf + size + tmp, size of buf - size - tmp)
865  in_limit = size + tmp
867  size += tmp
868  in_pos += tmp
869  Return true
870  Else
874  Buffer from which we read our input. It can be either* temp.buf or the caller-provided input buffer. = buf
875  in_pos = 0
877  If Not LZMA decoder core || in_pos > size + tmp Then Return false
880  * Compressed size of LZMA chunk or compressed/uncompressed * size of uncompressed chunk (64 KiB at maximum) -= in_pos
882  If in_pos < size Then
883  size -= in_pos
886  Return true
889  in_pos += in_pos - size
890  size = 0
893  in_avail = in_size - in_pos
894  If in_avail >= Minimum number of usable input buffer to safely decode one LZMA symbol Then
895  Buffer from which we read our input. It can be either* temp.buf or the caller-provided input buffer. = in
896  in_pos = in_pos
898  If in_avail >= * Compressed size of LZMA chunk or compressed/uncompressed * size of uncompressed chunk (64 KiB at maximum) + Minimum number of usable input buffer to safely decode one LZMA symbol Then in_limit = in_pos + * Compressed size of LZMA chunk or compressed/uncompressed * size of uncompressed chunk (64 KiB at maximum)
900  Else in_limit = in_size - Minimum number of usable input buffer to safely decode one LZMA symbol
903  If Not LZMA decoder core Then Return false
906  in_avail = in_pos - in_pos
907  If in_avail > * Compressed size of LZMA chunk or compressed/uncompressed * size of uncompressed chunk (64 KiB at maximum) Then Return false
910  * Compressed size of LZMA chunk or compressed/uncompressed * size of uncompressed chunk (64 KiB at maximum) -= in_avail
911  in_pos = in_pos
914  in_avail = in_size - in_pos
915  If in_avail < Minimum number of usable input buffer to safely decode one LZMA symbol Then
916  If in_avail > * Compressed size of LZMA chunk or compressed/uncompressed * size of uncompressed chunk (64 KiB at maximum) Then in_avail = * Compressed size of LZMA chunk or compressed/uncompressed * size of uncompressed chunk (64 KiB at maximum)
919  No 3D Now!(buf, in + in_pos, in_avail)
920  size = in_avail
921  in_pos += in_avail
924  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.