XZ Utils 5.4.0
|
Decodes Block Header from .xz files. More...
Functions | |
lzma_ret | lzma_block_header_decode (lzma_block *block, const lzma_allocator *allocator, const uint8_t *in) |
Decode Block Header. More... | |
Decodes Block Header from .xz files.
lzma_ret lzma_block_header_decode | ( | lzma_block * | block, |
const lzma_allocator * | allocator, | ||
const uint8_t * | in | ||
) |
Decode Block Header.
block->version should (usually) be set to the highest value supported by the application. If the application sets block->version to a value higher than supported by the current liblzma version, this function will downgrade block->version to the highest value supported by it. Thus one should check the value of block->version after calling this function if block->version was set to a non-zero value and the application doesn't otherwise know that the liblzma version being used is new enough to support the specified block->version.
The size of the Block Header must have already been decoded with lzma_block_header_size_decode() macro and stored to block->header_size.
The integrity check type from Stream Header must have been stored to block->check.
block->filters must have been allocated, but they don't need to be initialized (possible existing filter options are not freed).
block | Destination for Block options. |
allocator | lzma_allocator for custom allocator functions. Set to NULL to use malloc() (and also free() if an error occurs). |
in | Beginning of the input buffer. This must be at least block->header_size bytes. |