lz_decoder.h File Reference

LZ out window. More...

`#include "common.h"`

## Data Structures

struct | lzma_dict
struct | lzma_lz_options
struct | lzma_lz_decoder

## Macros

#define | LZMA_LZ_DECODER_INIT

## Functions

lzma_ret | lzma_lz_decoder_init (lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter_info *filters, lzma_ret(*lz_init)(lzma_lz_decoder *lz, const lzma_allocator *allocator, const void *options, lzma_lz_options *lz_options))
uint64_t | lzma_lz_decoder_memusage (size_t dictionary_size)
void | lzma_lz_decoder_uncompressed (void *coder, lzma_vli uncompressed_size)
static uint8_t | dict_get (const lzma_dict *const dict, const uint32_t distance)
| Get a byte from the history buffer. More...
static bool | dict_is_empty (const lzma_dict *const dict)
| Test if dictionary is empty. More...
static bool | dict_is_distance_valid (const lzma_dict *const dict, const size_t distance)
| Validate the match distance. More...
static bool | dict_repeat (lzma_dict *dict, uint32_t distance, uint32_t *len)
| Repeat *len bytes at distance. More...
static bool | dict_put (lzma_dict *dict, uint8_t byte)
static void | dict_write (lzma_dict *restrict dict, const uint8_t *restrict in, size_t *restrict in_pos, size_t in_size, size_t *restrict left)
| Copies arbitrary amount of data into the dictionary. More...
static void | dict_reset (lzma_dict *dict)

## Detailed Description

LZ out window.

## Macro Definition Documentation

## LZMA_LZ_DECODER_INIT

#define LZMA_LZ_DECODER_INIT

Value:
(lzma_lz_decoder){ \
.coder = NULL, \
.code = NULL, \
.reset = NULL, \
.set_uncompressed = NULL, \
.end = NULL, \
}
lzma_lz_decoder
Definition: lz_decoder.h:54

## Function Documentation

## dict_get()

static uint8_t dict_get | ( | const lzma_dict *const | dict,
|  | const uint32_t | distance
| ) |  |

inline static

Get a byte from the history buffer.

References lzma_dict::buf, lzma_dict::pos, and lzma_dict::size.

## dict_is_empty()

static bool dict_is_empty | ( | const lzma_dict *const | dict | ) |

inline static

Test if dictionary is empty.

References lzma_dict::full.

## dict_is_distance_valid()

static bool dict_is_distance_valid | ( | const lzma_dict *const | dict,
|  | const size_t | distance
| ) |  |

inline static

Validate the match distance.

References lzma_dict::full.

## dict_repeat()

static bool dict_repeat | ( | lzma_dict * | dict,
|  | uint32_t | distance,
|  | uint32_t * | len
| ) |  |

inline static

Repeat *len bytes at distance.

## dict_put()

static bool dict_put | ( | lzma_dict * | dict,
|  | uint8_t | byte
| ) |  |

inline static

Puts one byte into the dictionary. Returns true if the dictionary was already full and the byte couldn't be added.

## dict_write()

static void dict_write | ( | lzma_dict *restrict | dict,
|  | const uint8_t *restrict | in,
|  | size_t *restrict | in_pos,
|  | size_t | in_size,
|  | size_t *restrict | left
| ) |  |

inline static

Copies arbitrary amount of data into the dictionary.

References lzma_bufcpy().