61 const size_t in_start = *
in_pos;
62 const size_t out_start = *
out_pos;
68 const size_t in_used = *
in_pos - in_start;
69 const size_t out_used = *
out_pos - out_start;
81 in + in_start, in_used);
122 const size_t check_size = lzma_check_size(coder->
block->
check);
125 if (coder->
pos < check_size)
182 if (!lzma_check_is_supported(block->
check))
201 coder->
block = block;
#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_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
lzma_ret lzma_block_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator, lzma_block *block)
static lzma_ret block_encode(void *coder_ptr, const lzma_allocator *allocator, const uint8_t *restrict in, size_t *restrict in_pos, size_t in_size, uint8_t *restrict out, size_t *restrict out_pos, size_t out_size, lzma_action action)
static void block_encoder_end(void *coder_ptr, const lzma_allocator *allocator)
static lzma_ret block_encoder_update(void *coder_ptr, const lzma_allocator *allocator, const lzma_filter *filters lzma_attribute((__unused__)), const lzma_filter *reversed_filters)
#define COMPRESSED_SIZE_MAX
Biggest Compressed Size value that the Block encoder supports.
void lzma_check_finish(lzma_check_state *check, lzma_check type)
Finish the check calculation and store the result to check->buffer.u8.
void lzma_check_update(lzma_check_state *check, lzma_check type, const uint8_t *buf, size_t size)
Update the check state.
void lzma_check_init(lzma_check_state *check, lzma_check type)
Initialize *check depending on type.
const lzma_filter * filters
lzma_ret lzma_raw_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter *options)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
#define lzma_attribute(attr)
assert(limit<=UINT32_MAX/2)
Custom functions for memory handling.
lzma_check_state check
Check of the uncompressed data.
enum lzma_block_coder::@643 sequence
lzma_next_coder next
The filters in the chain; initialized with lzma_raw_decoder_init().
size_t pos
Position in the Check field.
lzma_vli uncompressed_size
Uncompressed Size calculated while decoding.
lzma_vli compressed_size
Compressed Size calculated while decoding.
Options for the Block and Block Header encoders and decoders.
lzma_vli uncompressed_size
Uncompressed Size in bytes.
uint8_t raw_check[LZMA_CHECK_SIZE_MAX]
Raw value stored in the Check field.
lzma_filter * filters
Array of filters.
lzma_check check
Type of integrity Check.
lzma_vli compressed_size
Size of the Compressed Data in bytes.
uint32_t version
Block format version.
Structure to hold internal state of the check being calculated.
union lzma_check_state::@638 buffer
Buffer to hold the final result and a temporary buffer for SHA256.
bool supported_actions[LZMA_ACTION_MAX+1]
Indicates which lzma_action values are allowed by next.code.
Hold data and function pointers of the next filter in the chain.
lzma_code_function code
Pointer to function to do the actual coding.
void * coder
Pointer to coder-specific data.
lzma_ret(* update)(void *coder, const lzma_allocator *allocator, const lzma_filter *filters, const lzma_filter *reversed_filters)
Passing data to and from liblzma.
#define LZMA_NEXT_CODER_INIT
Macro to initialize lzma_next_coder structure.
#define lzma_next_coder_init(func, next, allocator)
#define lzma_next_strm_init(func, strm,...)
void * lzma_alloc(size_t size, const lzma_allocator *allocator) lzma_attribute((__malloc__)) lzma_attr_alloc_size(1)
Allocates memory.
uint64_t uncompressed_size
uint64_t lzma_vli
Variable-length integer type.
#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_DATA_ERROR
Data is corrupt.
@ LZMA_MEM_ERROR
Cannot allocate memory.
@ LZMA_STREAM_END
End of stream was reached.
@ LZMA_UNSUPPORTED_CHECK
Cannot calculate the integrity check.
@ LZMA_OPTIONS_ERROR
Invalid or unsupported options.
@ LZMA_OK
Operation completed successfully.
lzma_action
The ‘action’ argument for lzma_code()
@ LZMA_SYNC_FLUSH
Make all the input available at output.
@ LZMA_FINISH
Finish the coding operation.
@ LZMA_RUN
Continue coding.
void lzma_free(void *ptr, const lzma_allocator *allocator)
Frees memory.
size_t lzma_bufcpy(const uint8_t *restrict in, size_t *restrict in_pos, size_t in_size, uint8_t *restrict out, size_t *restrict out_pos, size_t out_size)
lzma_ret lzma_next_filter_update(lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter *reversed_filters)
void lzma_next_end(lzma_next_coder *next, const lzma_allocator *allocator)