19 #define INDEX_BOUND ((1 + 1 + 2 * LZMA_VLI_BYTES_MAX + 4 + 3) & ~3)
22 #define HEADERS_BOUND (2 * LZMA_STREAM_HEADER_SIZE + INDEX_BOUND)
47 uint8_t *
out,
size_t *out_pos_ptr,
size_t out_size)
52 || out_pos_ptr ==
NULL || *out_pos_ptr > out_size)
55 if (!lzma_check_is_supported(
check))
82 if (lzma_stream_header_encode(&stream_flags,
out +
out_pos)
112 lzma_block_unpadded_size(&block),
118 ret = lzma_index_buffer_encode(
131 if (lzma_stream_footer_encode(&stream_flags,
out +
out_pos)
lzma_check
Type of the integrity check (Check ID)
#define LZMA_CHECK_ID_MAX
Maximum valid Check ID.
const lzma_allocator const uint8_t size_t uint8_t size_t * out_pos
const lzma_allocator const uint8_t size_t in_size
const lzma_allocator * allocator
const lzma_allocator const uint8_t * in
const lzma_allocator const uint8_t size_t uint8_t * out
const lzma_filter * filters
LZMA_API(size_t)
Calculate maximum output size for single-call Block encoding.
#define HEADERS_BOUND
Stream Header, Stream Footer, and Index.
#define LZMA_STREAM_HEADER_SIZE
Size of Stream Header and Stream Footer.
Custom functions for memory handling.
Options for the Block and Block Header encoders and decoders.
lzma_vli uncompressed_size
Uncompressed Size in bytes.
uint32_t version
Block format version.
Options for encoding/decoding Stream Header and Stream Footer.
uint32_t version
Stream Flags format version.
lzma_vli backward_size
Backward Size.
#define return_if_error(expr)
Return if expression doesn't evaluate to LZMA_OK.
uint64_t uncompressed_size
#define LZMA_VLI_MAX
Maximum supported value of a variable-length integer.
lzma_ret
Return values used by several functions in liblzma.
@ LZMA_PROG_ERROR
Programming error.
@ LZMA_MEM_ERROR
Cannot allocate memory.
@ LZMA_UNSUPPORTED_CHECK
Cannot calculate the integrity check.
@ LZMA_BUF_ERROR
No progress is possible.
@ LZMA_OK
Operation completed successfully.