Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Decode the Compressed Data field from a Block

Proto:static enum xz_ret dec_block(struct xz_dec *s, struct xz_buf *b)

Type:enum xz_ret

Parameter:

TypeParameterName
struct xz_dec *s
struct xz_buf *b
222  Saved in_pos and out_pos = in_pos
223  out_start = out_pos
230  ret = Take care of the LZMA2 control layer, and forward the job of actual LZMA* decoding or copying of uncompressed chunks to other functions.
232  Observed compressed size of the current Block += in_pos - Saved in_pos and out_pos
233  Observed uncompressed size of the current Block += out_pos - out_start
239  If Observed compressed size of the current Block > Value stored in the Compressed Size field, or* VLI_UNKNOWN if Compressed Size is not present. || Observed uncompressed size of the current Block > Value stored in the Uncompressed Size field, or* VLI_UNKNOWN if Uncompressed Size is not present. Then Return XZ_DATA_ERROR
244  If Type of the integrity check calculated from uncompressed data == XZ_CHECK_CRC32 Then CRC32 value in Block or Index = xz_crc32(out + out_start, out_pos - out_start, CRC32 value in Block or Index )
248  If ret == XZ_STREAM_END Then
249  If Value stored in the Compressed Size field, or* VLI_UNKNOWN if Compressed Size is not present. != VLI_UNKNOWN && Value stored in the Compressed Size field, or* VLI_UNKNOWN if Compressed Size is not present. != Observed compressed size of the current Block Then Return XZ_DATA_ERROR
254  If Value stored in the Uncompressed Size field, or* VLI_UNKNOWN if Uncompressed Size is not present. != VLI_UNKNOWN && Value stored in the Uncompressed Size field, or* VLI_UNKNOWN if Uncompressed Size is not present. != Observed uncompressed size of the current Block Then Return XZ_DATA_ERROR
259  unpadded += Size of the Block Header field + Observed compressed size of the current Block
265  If Type of the integrity check calculated from uncompressed data == XZ_CHECK_CRC32 Then unpadded += 4
269  uncompressed += Observed uncompressed size of the current Block
270  crc32 = xz_crc32((constuint8_t * ) & Hash calculated from the Block sizes. This is used to* validate the Index field., size of Hash calculated from the Block sizes. This is used to* validate the Index field. , crc32)
274  ++Number of Blocks decoded so far
277  Return ret
Caller
NameDescribe
dec_main