![]() |
Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
|
Options for the Block and Block Header encoders and decoders. More...
#include <block.h>
Options for the Block and Block Header encoders and decoders.
Different Block handling functions use different parts of this structure. Some read some members, other functions write, and some do both. Only the members listed for reading need to be initialized when the specified functions are called. The members marked for writing will be assigned new values at some point either by calling the given function or by later calls to lzma_code().
lzma_check check |
Type of integrity Check.
The Check ID is not stored into the Block Header, thus its value must be provided also when decoding.
Read by:
lzma_vli compressed_size |
Size of the Compressed Data in bytes.
Encoding: If this is not LZMA_VLI_UNKNOWN, Block Header encoder will store this value to the Block Header. Block encoder doesn't care about this value, but will set it once the encoding has been finished.
Decoding: If this is not LZMA_VLI_UNKNOWN, Block decoder will verify that the size of the Compressed Data field matches compressed_size.
Usually you don't know this value when encoding in streamed mode, and thus cannot write this field into the Block Header.
In non-streamed mode you can reserve space for this field before encoding the actual Block. After encoding the data, finish the Block by encoding the Block Header. Steps in detail:
Read by:
Written by:
Encoding: If this is not LZMA_VLI_UNKNOWN, Block Header encoder will store this value to the Block Header. Block encoder doesn't care about this value, but will set it once the encoding has been finished.
Decoding: If this is not LZMA_VLI_UNKNOWN, Block decoder will verify that the size of the Compressed Data field matches compressed_size.
Usually you don't know this value when encoding in streamed mode, and thus cannot write this field into the Block Header.
In non-streamed mode you can reserve space for this field before encoding the actual Block. After encoding the data, finish the Block by encoding the Block Header. Steps in detail:
Read by:
Written by:
lzma_filter * filters |
Array of filters.
There can be 1-4 filters. The end of the array is marked with .id = LZMA_VLI_UNKNOWN.
Read by:
Written by:
uint32_t header_size |
Size of the Block Header field.
Size of the Block Header field in bytes.
This is always a multiple of four.
Read by:
Written by:
This is always a multiple of four.
Read by:
Written by:
lzma_bool ignore_check |
A flag to Block decoder to not verify the Check field.
This field is supported by liblzma >= 5.1.4beta if .version >= 1.
If this is set to true, the integrity check won't be calculated and verified. Unless you know what you are doing, you should leave this to false. (A reason to set this to true is when the file integrity is verified externally anyway and you want to speed up the decompression, which matters mostly when using SHA-256 as the integrity check.)
If .version >= 1, read by:
Written by (.version is ignored):
This member is supported by liblzma >= 5.1.4beta if .version >= 1.
If this is set to true, the integrity check won't be calculated and verified. Unless you know what you are doing, you should leave this to false. (A reason to set this to true is when the file integrity is verified externally anyway and you want to speed up the decompression, which matters mostly when using SHA-256 as the integrity check.)
If .version >= 1, read by:
Written by (.version is ignored):
uint8_t raw_check |
Raw value stored in the Check field.
After successful coding, the first lzma_check_size(check) bytes of this array contain the raw value stored in the Check field.
Note that CRC32 and CRC64 are stored in little endian byte order. Take it into account if you display the Check values to the user.
Written by:
After successful coding, the first lzma_check_size(check) bytes of this array contain the raw value stored in the Check field.
Note that CRC32 and CRC64 are stored in little endian byte order. Take it into account if you display the Check values to the user.
Written by:
lzma_bool reserved_bool2 |
Reserved member.
lzma_bool reserved_bool3 |
Reserved member.
lzma_bool reserved_bool4 |
Reserved member.
lzma_bool reserved_bool5 |
Reserved member.
lzma_bool reserved_bool6 |
Reserved member.
lzma_bool reserved_bool7 |
Reserved member.
lzma_bool reserved_bool8 |
Reserved member.
lzma_reserved_enum reserved_enum1 |
Reserved member.
lzma_reserved_enum reserved_enum2 |
Reserved member.
lzma_reserved_enum reserved_enum3 |
Reserved member.
lzma_reserved_enum reserved_enum4 |
Reserved member.
uint32_t reserved_int1 |
Reserved member.
uint32_t reserved_int2 |
Reserved member.
lzma_vli reserved_int3 |
Reserved member.
lzma_vli reserved_int4 |
Reserved member.
lzma_vli reserved_int5 |
Reserved member.
lzma_vli reserved_int6 |
Reserved member.
lzma_vli reserved_int7 |
Reserved member.
lzma_vli reserved_int8 |
Reserved member.
void * reserved_ptr1 |
Reserved member.
void * reserved_ptr2 |
Reserved member.
void * reserved_ptr3 |
Reserved member.
lzma_vli uncompressed_size |
Uncompressed Size in bytes.
This is handled very similarly to compressed_size above.
uncompressed_size is needed by fewer functions than compressed_size. This is because uncompressed_size isn't needed to validate that Block stays within proper limits.
Read by:
Written by:
This is handled very similarly to compressed_size above.
uncompressed_size is needed by fewer functions than compressed_size. This is because uncompressed_size isn't needed to validate that Block stays within proper limits.
Read by:
Written by:
uint32_t version |
Block format version.
To prevent API and ABI breakages when new features are needed, a version number is used to indicate which fields in this structure are in use:
If version is greater than one, most Block related functions will return LZMA_OPTIONS_ERROR (lzma_block_header_decode() works with any version value).
Read by:
Written by:
To prevent API and ABI breakages when new features are needed, a version number is used to indicate which members in this structure are in use:
If version is greater than one, most Block related functions will return LZMA_OPTIONS_ERROR (lzma_block_header_decode() works with any version value).
Read by:
Written by: