delta_encoder.c File Reference

Delta filter encoder. More...

`#include "delta_encoder.h"`
`#include "delta_private.h"`

## Functions

static void | copy_and_encode (lzma_delta_coder *coder, const uint8_t *restrict in, uint8_t *restrict out, size_t size)
static void | encode_in_place (lzma_delta_coder *coder, uint8_t *buffer, size_t size)
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 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_encoder_init (lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter_info *filters)
lzma_ret | lzma_delta_props_encode (const void *options, uint8_t *out)

## Detailed Description

Delta filter encoder.

## Function Documentation

## copy_and_encode()

static void copy_and_encode | ( | lzma_delta_coder * | coder,
|  | const uint8_t *restrict | in,
|  | uint8_t *restrict | out,
|  | size_t | size
| ) |  |

static

Copies and encodes the data at the same time. This is used when Delta is the first filter in the chain (and thus the last filter in the encoder's filter stack).

References lzma_delta_coder::distance, lzma_delta_coder::history, and lzma_delta_coder::pos.

## encode_in_place()

static void encode_in_place | ( | lzma_delta_coder * | coder,
|  | uint8_t * | buffer,
|  | size_t | size
| ) |  |

static

Encodes the data in place. This is used when we are the last filter in the chain (and thus non-last filter in the encoder's filter stack).

References lzma_delta_coder::distance, lzma_delta_coder::history, and lzma_delta_coder::pos.