XZ Utils
5.2.4
|
Encodes Block Header for .xz files. More...
Functions | |
lzma_ret | lzma_block_header_size (lzma_block *block) |
Calculate Block Header Size. More... | |
lzma_ret | lzma_block_header_encode (const lzma_block *block, uint8_t *out) |
Encode Block Header. More... | |
Encodes Block Header for .xz files.
lzma_ret lzma_block_header_size | ( | lzma_block * | block | ) |
Calculate Block Header Size.
Calculate the minimum size needed for the Block Header field using the settings specified in the lzma_block structure. Note that it is OK to increase the calculated header_size value as long as it is a multiple of four and doesn't exceed LZMA_BLOCK_HEADER_SIZE_MAX. Increasing header_size just means that lzma_block_header_encode() will add Header Padding.
References lzma_filter_flags_size(), LZMA_FILTERS_MAX, LZMA_OPTIONS_ERROR, LZMA_PROG_ERROR, lzma_vli_size(), LZMA_VLI_UNKNOWN, and return_if_error.
lzma_ret lzma_block_header_encode | ( | const lzma_block * | block, |
uint8_t * | out | ||
) |
Encode Block Header.
The caller must have calculated the size of the Block Header already with lzma_block_header_size(). If a value larger than the one calculated by lzma_block_header_size() is used, the Block Header will be padded to the specified size.
out | Beginning of the output buffer. This must be at least block->header_size bytes. |
block | Block options to be encoded. |
References lzma_block_unpadded_size(), lzma_filter_flags_encode(), LZMA_FILTERS_MAX, LZMA_PROG_ERROR, lzma_vli_encode(), lzma_vli_is_valid, LZMA_VLI_UNKNOWN, and return_if_error.