78 const size_t dict_start = coder->
dict.
pos;
98 const size_t copy_size = coder->
dict.
pos - dict_start;
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
const lzma_filter * filters
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
static const char struct stat static buf struct stat static buf static vhangup int options
void lzma_lz_decoder_uncompressed(void *coder_ptr, lzma_vli uncompressed_size)
lzma_ret lzma_lz_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter_info *filters, lzma_ret(*lz_init)(lzma_lz_decoder *lz, const lzma_allocator *allocator, const void *options, lzma_lz_options *lz_options))
static lzma_ret lz_decode(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 decode_buffer(lzma_coder *coder, 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)
static void lz_decoder_reset(lzma_coder *coder)
uint64_t lzma_lz_decoder_memusage(size_t dictionary_size)
static void lz_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
#define LZMA_LZ_DECODER_INIT
assert(limit<=UINT32_MAX/2)
Custom functions for memory handling.
struct lzma_coder::@655 temp
uint8_t buffer[LZMA_BUFFER_SIZE]
lzma_next_coder next
Next coder in the chain.
lzma_dict dict
Dictionary (history buffer)
lzma_lz_decoder lz
The actual LZ-based decoder e.g. LZMA.
bool next_finished
True if the next filter in the chain has returned LZMA_STREAM_END.
bool need_reset
True when dictionary should be reset before decoding more data.
size_t size
Size of the dictionary.
void * options
Pointer to filter-specific options structure.
void * coder
Data specific to the LZ-based decoder.
void(* set_uncompressed)(void *coder, lzma_vli uncompressed_size)
Set the uncompressed size.
void(* end)(void *coder, const lzma_allocator *allocator)
Free allocated resources.
lzma_ret(* code)(void *coder, lzma_dict *restrict dict, const uint8_t *restrict in, size_t *restrict in_pos, size_t in_size)
Function to decode from in[] to *dict.
const uint8_t * preset_dict
TODO: Comment.
size_t dict_size
Size of the history buffer.
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.
#define LZMA_BUFFER_SIZE
Size of temporary buffers needed in some filters.
#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.
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.
lzma_ret
Return values used by several functions in liblzma.
@ LZMA_DATA_ERROR
Data is corrupt.
@ 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_ret lzma_next_filter_init(lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter_info *filters)
void lzma_free(void *ptr, const lzma_allocator *allocator)
Frees memory.
void lzma_next_end(lzma_next_coder *next, const lzma_allocator *allocator)