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

Name:Decode the Block Header and initialize the filter chain.

Proto:static enum xz_ret dec_block_header(struct xz_dec *s)

Type:enum xz_ret

Parameter:

TypeParameterName
struct xz_dec *s
457  size -= 4
458  If xz_crc32(buf, size, 0) != get_le32(buf + size) Then Return XZ_DATA_ERROR
462  pos = 2
471  If buf[1] & 0x3F Then Return XZ_OPTIONS_ERROR
476  If buf[1] & 0x40 Then
477  If Decode a variable-length integer (little-endian base-128 encoding) != XZ_STREAM_END Then Return XZ_DATA_ERROR
481  Value stored in the Compressed Size field, or* VLI_UNKNOWN if Compressed Size is not present. = Variable-length integer decoded by dec_vli()
482  Else
483  Value stored in the Compressed Size field, or* VLI_UNKNOWN if Compressed Size is not present. = VLI_UNKNOWN
487  If buf[1] & 0x80 Then
488  If Decode a variable-length integer (little-endian base-128 encoding) != XZ_STREAM_END Then Return XZ_DATA_ERROR
492  Value stored in the Uncompressed Size field, or* VLI_UNKNOWN if Uncompressed Size is not present. = Variable-length integer decoded by dec_vli()
493  Else
494  Value stored in the Uncompressed Size field, or* VLI_UNKNOWN if Uncompressed Size is not present. = VLI_UNKNOWN
518  If size - pos < 2 Then Return XZ_DATA_ERROR
522  If buf[pos++] != 0x21 Then Return XZ_OPTIONS_ERROR
526  If buf[pos++] != 0x01 Then Return XZ_OPTIONS_ERROR
530  If size - pos < 1 Then Return XZ_DATA_ERROR
533  ret = xz_dec_lzma2_reset(lzma2, buf[pos++])
534  If ret != XZ_OK Then Return ret
538  When pos < size cycle
539  If buf[pos++] != 0x00 Then Return XZ_OPTIONS_ERROR
542  pos = 0
543  Observed compressed size of the current Block = 0
544  Observed uncompressed size of the current Block = 0
546  Return XZ_OK
Caller
NameDescribe
dec_main