114 case SEQ_STREAM_HEADER: {
126 const lzma_ret ret = lzma_stream_header_decode(
152 && !lzma_check_is_supported(
162 case SEQ_BLOCK_HEADER: {
166 if (coder->
pos == 0) {
265 lzma_block_unpadded_size(
287 coder->
sequence = SEQ_STREAM_FOOTER;
292 case SEQ_STREAM_FOOTER: {
307 const lzma_ret ret = lzma_stream_footer_decode(
308 &footer_flags, coder->
buffer);
327 coder->
sequence = SEQ_STREAM_PADDING;
332 case SEQ_STREAM_PADDING:
345 return coder->
pos == 0
356 coder->
pos = (coder->
pos + 1) & 3;
361 if (coder->
pos != 0) {
407 if (new_memlimit != 0) {
408 if (new_memlimit < coder->memusage)
lzma_check
Type of the integrity check (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
#define lzma_block_header_size_decode(b)
Decode the Block Header Size field.
const lzma_allocator const uint8_t size_t uint8_t * out
#define LZMA_BLOCK_HEADER_SIZE_MAX
lzma_ret lzma_block_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator, lzma_block *block)
#define LZMA_TELL_ANY_CHECK
#define LZMA_IGNORE_CHECK
#define LZMA_CONCATENATED
const lzma_filter * filters
#define LZMA_TELL_NO_CHECK
#define LZMA_TELL_UNSUPPORTED_CHECK
#define LZMA_FILTERS_MAX
Maximum number of filters in a chain.
static const char struct stat static buf struct stat static buf static vhangup int options
assert(limit<=UINT32_MAX/2)
static struct sockaddr static addrlen static backlog const void static flags void flags
static lzma_ret stream_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 void stream_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
static lzma_ret stream_decoder_reset(lzma_stream_coder *coder, const lzma_allocator *allocator)
static lzma_check stream_decoder_get_check(const void *coder_ptr)
lzma_ret lzma_stream_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator, uint64_t memlimit, uint32_t flags)
static lzma_ret stream_decoder_memconfig(void *coder_ptr, uint64_t *memusage, uint64_t *old_memlimit, uint64_t new_memlimit)
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_bool ignore_check
A flag to Block decoder to not verify the Check field.
lzma_filter * filters
Array of filters.
uint32_t header_size
Size of the Block Header field.
lzma_check check
Type of integrity Check.
uint32_t version
Block format version.
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)
uint8_t buffer[LZMA_BLOCK_HEADER_SIZE_MAX]
lzma_index_hash * index_hash
bool tell_unsupported_check
lzma_block block_options
Options for the Block encoder.
size_t pos
Write position in buffer[] and position in Stream Padding.
enum lzma_stream_coder::@652 sequence
lzma_stream_flags stream_flags
Stream Flags from Stream Header.
uint64_t memlimit
Memory usage limit.
lzma_next_coder block_decoder
bool tell_any_check
If true, LZMA_GET_CHECK is returned after decoding Stream Header.
uint64_t memusage
Amount of memory actually needed (only an estimate)
Options for encoding/decoding Stream Header and Stream Footer.
lzma_vli backward_size
Backward Size.
lzma_check check
Check ID.
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_FORMAT_ERROR
Memory usage limit was reached.
@ LZMA_STREAM_END
End of stream was reached.
@ LZMA_UNSUPPORTED_CHECK
Cannot calculate the integrity check.
@ 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.
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)