68 coder->
sequence = SEQ_DICTIONARY_SIZE;
72 case SEQ_DICTIONARY_SIZE:
76 if (++coder->
pos == 4) {
97 coder->
sequence = SEQ_UNCOMPRESSED_SIZE;
103 case SEQ_UNCOMPRESSED_SIZE:
107 if (++coder->
pos < 8)
129 case SEQ_CODER_INIT: {
188 if (new_memlimit != 0) {
189 if (new_memlimit < coder->memusage)
220 coder->
picky = picky;
static lzma_ret alone_decoder_memconfig(void *coder_ptr, uint64_t *memusage, uint64_t *old_memlimit, uint64_t new_memlimit)
static void alone_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
static lzma_ret alone_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)
lzma_ret lzma_alone_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator, uint64_t memlimit, bool picky)
Decoder for LZMA_Alone files.
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
void lzma_lz_decoder_uncompressed(void *coder_ptr, lzma_vli uncompressed_size)
bool lzma_lzma_lclppb_decode(lzma_options_lzma *options, uint8_t byte)
Decodes the LZMA Properties byte (lc/lp/pb)
uint64_t lzma_lzma_decoder_memusage(const void *options)
lzma_ret lzma_lzma_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter_info *filters)
Allocates and initializes LZMA decoder.
Custom functions for memory handling.
size_t pos
Position in the header fields.
enum lzma_alone_coder::@640 sequence
uint64_t memusage
Amount of memory actually needed (only an estimate)
uint64_t memlimit
Memory usage limit.
lzma_vli uncompressed_size
Uncompressed size decoded from the header.
lzma_options_lzma options
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(* memconfig)(void *coder, uint64_t *memusage, uint64_t *old_memlimit, uint64_t new_memlimit)
Options specific to the LZMA1 and LZMA2 filters.
const uint8_t * preset_dict
Pointer to an initial dictionary.
uint32_t preset_dict_size
Size of the preset dictionary.
uint32_t dict_size
Dictionary size in bytes.
Passing data to and from liblzma.
#define LZMA_NEXT_CODER_INIT
Macro to initialize lzma_next_coder structure.
#define LZMA_MEMUSAGE_BASE
#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 lzma_vli
Variable-length integer type.
#define LZMA_VLI_C(n)
VLI constant suffix.
#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_FORMAT_ERROR
Memory usage limit was reached.
@ LZMA_OK
Operation completed successfully.
lzma_action
The ‘action’ argument for lzma_code()
@ LZMA_FINISH
Finish the coding operation.
@ LZMA_RUN
Continue coding.
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)