135 memusage, old_memlimit, new_memlimit);
144 if (new_memlimit != 0 && new_memlimit < *memusage)
148 if (ret ==
LZMA_OK && new_memlimit != 0)
lzma_ret lzma_alone_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator, uint64_t memlimit, bool picky)
Decoder for LZMA_Alone files.
lzma_check
Type of the integrity check (Check ID)
static lzma_check auto_decoder_get_check(const void *coder_ptr)
static void auto_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
static lzma_ret auto_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 auto_decoder_memconfig(void *coder_ptr, uint64_t *memusage, uint64_t *old_memlimit, uint64_t new_memlimit)
static lzma_ret auto_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator, uint64_t memlimit, uint32_t flags)
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_TELL_ANY_CHECK
#define LZMA_CONCATENATED
#define LZMA_TELL_NO_CHECK
assert(limit<=UINT32_MAX/2)
static struct sockaddr static addrlen static backlog const void static flags void flags
lzma_ret lzma_stream_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator, uint64_t memlimit, uint32_t flags)
Custom functions for memory handling.
enum lzma_auto_coder::@642 sequence
lzma_next_coder next
Stream decoder or LZMA_Alone decoder.
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_check(* get_check)(const void *coder)
lzma_ret(* memconfig)(void *coder, uint64_t *memusage, uint64_t *old_memlimit, uint64_t new_memlimit)
Passing data to and from liblzma.
#define LZMA_NEXT_CODER_INIT
Macro to initialize lzma_next_coder structure.
#define LZMA_SUPPORTED_FLAGS
#define LZMA_MEMUSAGE_BASE
#define return_if_error(expr)
Return if expression doesn't evaluate to LZMA_OK.
#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.
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_GET_CHECK
Integrity check type is now available.
@ LZMA_NO_CHECK
Input stream has no integrity check.
@ LZMA_OPTIONS_ERROR
Invalid or unsupported options.
@ LZMA_OK
Operation completed successfully.
lzma_action
The ‘action’ argument for lzma_code()
@ LZMA_FINISH
Finish the coding operation.
@ LZMA_RUN
Continue coding.
void lzma_free(void *ptr, const lzma_allocator *allocator)
Frees memory.
void lzma_next_end(lzma_next_coder *next, const lzma_allocator *allocator)