24 const size_t distance = coder->
distance;
26 for (
size_t i = 0;
i <
size; ++
i) {
28 (distance + coder->
pos) & 0xFF];
40 const size_t distance = coder->
distance;
42 for (
size_t i = 0;
i <
size; ++
i) {
44 (distance + coder->
pos) & 0xFF];
63 const size_t out_avail = out_size - *
out_pos;
64 const size_t size =
my_min(in_avail, out_avail);
75 const size_t out_start = *
out_pos;
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
#define LZMA_DELTA_DIST_MIN
uint64_t lzma_delta_coder_memusage(const void *options)
lzma_ret lzma_delta_coder_init(lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter_info *filters)
static lzma_ret delta_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 void encode_in_place(lzma_delta_coder *coder, uint8_t *buffer, size_t size)
static lzma_ret delta_encoder_update(void *coder_ptr, const lzma_allocator *allocator, const lzma_filter *filters_null lzma_attribute((__unused__)), const lzma_filter *reversed_filters)
lzma_ret lzma_delta_props_encode(const void *options, uint8_t *out)
static void copy_and_encode(lzma_delta_coder *coder, const uint8_t *restrict in, uint8_t *restrict out, size_t size)
lzma_ret lzma_delta_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter_info *filters)
Private common stuff for Delta encoder and decoder.
static const char struct stat static buf struct stat static buf static vhangup int options
#define lzma_attribute(attr)
Custom functions for memory handling.
lzma_next_coder next
Next coder in the chain.
uint8_t pos
Position in history[].
uint8_t history[LZMA_DELTA_DIST_MAX]
Buffer to hold history of the original data.
size_t distance
Delta distance.
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)
Options for the Delta filter.
uint32_t dist
Delta distance.
lzma_ret
Return values used by several functions in liblzma.
@ LZMA_PROG_ERROR
Programming error.
@ LZMA_STREAM_END
End of stream was reached.
@ LZMA_OK
Operation completed successfully.
lzma_action
The ‘action’ argument for lzma_code()
@ LZMA_RUN
Continue coding.
lzma_ret lzma_next_filter_update(lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter *reversed_filters)