91 case SEQ_STREAM_HEADER:
92 case SEQ_BLOCK_HEADER:
93 case SEQ_STREAM_FOOTER:
99 if (coder->
sequence == SEQ_STREAM_FOOTER)
106 case SEQ_BLOCK_INIT: {
150 case SEQ_BLOCK_ENCODE: {
178 case SEQ_INDEX_ENCODE: {
191 .backward_size = lzma_index_size(coder->
index),
195 if (lzma_stream_footer_encode(&stream_flags, coder->
buffer)
200 coder->
sequence = SEQ_STREAM_FOOTER;
237 if (coder->
sequence <= SEQ_BLOCK_INIT) {
251 }
else if (coder->
sequence <= SEQ_BLOCK_ENCODE) {
299 coder->
sequence = SEQ_STREAM_HEADER;
315 &stream_flags, coder->
buffer));
lzma_check
Type of the integrity check (Check ID)
const lzma_allocator lzma_vli unpadded_size
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
#define LZMA_BLOCK_HEADER_SIZE_MAX
lzma_ret lzma_block_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator, lzma_block *block)
const lzma_filter * filters
#define LZMA_FILTERS_MAX
Maximum number of filters in a chain.
lzma_ret lzma_index_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator, const lzma_index *i)
assert(limit<=UINT32_MAX/2)
def convert(trace_codes, trap_json)
static void stream_encoder_end(void *coder_ptr, const lzma_allocator *allocator)
static lzma_ret stream_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 lzma_ret stream_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter *filters, lzma_check check)
static lzma_ret block_encoder_init(lzma_stream_coder *coder, const lzma_allocator *allocator)
static lzma_ret stream_encoder_update(void *coder_ptr, const lzma_allocator *allocator, const lzma_filter *filters, const lzma_filter *reversed_filters)
struct lzma_stream_coder_s lzma_stream_coder
#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.
lzma_filter * filters
Array of filters.
uint32_t header_size
Size of the Block Header field.
lzma_check check
Type of integrity Check.
lzma_vli compressed_size
Size of the Compressed Data in bytes.
uint32_t version
Block format version.
void * options
Pointer to filter-specific options structure.
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)
uint8_t buffer[LZMA_BLOCK_HEADER_SIZE_MAX]
lzma_next_coder index_encoder
lzma_index * index
Index to hold sizes of the Blocks.
lzma_block block_options
Options for the Block encoder.
enum lzma_stream_coder::@652 sequence
size_t buffer_pos
Read position in buffer[].
bool block_encoder_is_initialized
size_t buffer_size
Total number of bytes in buffer[].
lzma_filter filters[LZMA_FILTERS_MAX+1]
The filter chain currently in use.
lzma_next_coder block_encoder
Block.
Options for encoding/decoding Stream Header and Stream Footer.
uint32_t version
Stream Flags format version.
Passing data to and from liblzma.
#define LZMA_NEXT_CODER_INIT
Macro to initialize lzma_next_coder structure.
#define return_if_error(expr)
Return if expression doesn't evaluate to LZMA_OK.
#define lzma_next_coder_init(func, next, allocator)
#define LZMA_ACTION_MAX
Largest valid lzma_action value as unsigned integer.
#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 lzma_vli
Variable-length integer type.
#define LZMA_VLI_UNKNOWN
VLI value to denote that the value is unknown.
lzma_ret
Return values used by several functions in liblzma.
@ LZMA_PROG_ERROR
Programming error.
@ LZMA_MEM_ERROR
Cannot allocate memory.
@ LZMA_STREAM_END
End of stream was reached.
@ 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.
@ LZMA_FULL_FLUSH
Finish encoding of the current Block.
@ LZMA_FULL_BARRIER
Finish encoding of the current Block.
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)
void lzma_next_end(lzma_next_coder *next, const lzma_allocator *allocator)