Decodes Block Header from .xz files. More...
#include "common.h"
#include "check.h"
Functions | |
static void | free_properties (lzma_block *block, lzma_allocator *allocator) |
lzma_ret | lzma_block_header_decode (lzma_block *block, lzma_allocator *allocator, const uint8_t *in) |
Decode Block Header. |
Decodes Block Header from .xz files.
lzma_ret lzma_block_header_decode | ( | lzma_block * | block, | |
lzma_allocator * | allocator, | |||
const uint8_t * | in | |||
) |
Decode Block Header.
block->version should be set to the highest value supported by the application; currently the only possible version is zero. This function will set version to the lowest value that still supports all the features required by the Block Header.
The size of the Block Header must have already been decoded with lzma_block_header_size_decode() macro and stored to block->header_size.
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. |
References lzma_block_header_size_decode, lzma_block_unpadded_size(), LZMA_CHECK_ID_MAX, lzma_crc32(), lzma_filter_flags_decode(), LZMA_OK, lzma_vli_decode(), and return_if_error.
Referenced by parse_block_header().