Rizin
unix-like reverse engineering framework and cli tools
|
Range Encoder. More...
Go to the source code of this file.
Classes | |
struct | lzma_range_encoder |
Macros | |
#define | RC_SYMBOLS_MAX 58 |
Functions | |
static void | rc_reset (lzma_range_encoder *rc) |
static void | rc_bit (lzma_range_encoder *rc, probability *prob, uint32_t bit) |
static void | rc_bittree (lzma_range_encoder *rc, probability *probs, uint32_t bit_count, uint32_t symbol) |
static void | rc_bittree_reverse (lzma_range_encoder *rc, probability *probs, uint32_t bit_count, uint32_t symbol) |
static void | rc_direct (lzma_range_encoder *rc, uint32_t value, uint32_t bit_count) |
static void | rc_flush (lzma_range_encoder *rc) |
static bool | rc_shift_low (lzma_range_encoder *rc, uint8_t *out, size_t *out_pos, size_t out_size) |
static bool | rc_encode (lzma_range_encoder *rc, uint8_t *out, size_t *out_pos, size_t out_size) |
static uint64_t | rc_pending (const lzma_range_encoder *rc) |
Range Encoder.
Definition in file range_encoder.h.
#define RC_SYMBOLS_MAX 58 |
Maximum number of symbols that can be put pending into lzma_range_encoder structure between calls to lzma_rc_encode(). For LZMA, 52+5 is enough (match with big distance and length followed by range encoder flush).
Definition at line 24 of file range_encoder.h.
|
inlinestatic |
Definition at line 67 of file range_encoder.h.
References bit, lzma_range_encoder::count, lzma_range_encoder::probs, and lzma_range_encoder::symbols.
Referenced by rc_bittree(), and rc_bittree_reverse().
|
inlinestatic |
Definition at line 76 of file range_encoder.h.
Referenced by encode_init(), length(), literal(), and match().
|
inlinestatic |
|
inlinestatic |
Definition at line 105 of file range_encoder.h.
References lzma_range_encoder::count, lzma_range_encoder::symbols, and value.
|
inlinestatic |
Definition at line 150 of file range_encoder.h.
References assert(), lzma_range_encoder::count, lzma_range_encoder::low, out, out_pos, lzma_range_encoder::pos, lzma_range_encoder::probs, lzma_range_encoder::range, RC_BIT_MODEL_TOTAL, RC_BIT_MODEL_TOTAL_BITS, RC_MOVE_BITS, rc_reset(), RC_SHIFT_BITS, rc_shift_low(), RC_SYMBOLS_MAX, RC_TOP_VALUE, lzma_range_encoder::symbols, and UINT32_MAX.
Referenced by lzma_lzma_encode().
|
inlinestatic |
Definition at line 116 of file range_encoder.h.
References lzma_range_encoder::count, i, and lzma_range_encoder::symbols.
Referenced by lzma_lzma_encode().
|
inlinestatic |
Definition at line 226 of file range_encoder.h.
References lzma_range_encoder::cache_size.
Referenced by lzma_lzma_encode().
|
inlinestatic |
Definition at line 55 of file range_encoder.h.
References lzma_range_encoder::cache, lzma_range_encoder::cache_size, lzma_range_encoder::count, lzma_range_encoder::low, lzma_range_encoder::pos, lzma_range_encoder::range, and UINT32_MAX.
Referenced by rc_encode().
|
inlinestatic |
Definition at line 124 of file range_encoder.h.
References lzma_range_encoder::cache, lzma_range_encoder::cache_size, lzma_range_encoder::low, out, out_pos, and RC_SHIFT_BITS.
Referenced by rc_encode().