14 #ifndef LZMA_RANGE_ENCODER_H
15 #define LZMA_RANGE_ENCODER_H
24 #define RC_SYMBOLS_MAX 58
84 model_index = (model_index << 1) +
bit;
85 }
while (bit_count != 0);
99 model_index = (model_index << 1) +
bit;
100 }
while (--bit_count != 0);
110 = RC_DIRECT_0 + ((
value >> --bit_count) & 1);
111 }
while (bit_count != 0);
118 for (
size_t i = 0;
i < 5; ++
i)
RzList * symbols(RzBinFile *bf)
const lzma_allocator const uint8_t size_t uint8_t size_t * out_pos
const lzma_allocator const uint8_t size_t uint8_t * out
assert(limit<=UINT32_MAX/2)
Probability price calculation.
Common things for range encoder and decoder.
uint16_t probability
Type of probabilities used with range coder.
#define RC_BIT_MODEL_TOTAL_BITS
#define RC_BIT_MODEL_TOTAL
static bool rc_shift_low(lzma_range_encoder *rc, uint8_t *out, size_t *out_pos, size_t out_size)
static void rc_direct(lzma_range_encoder *rc, uint32_t value, uint32_t bit_count)
static bool rc_encode(lzma_range_encoder *rc, uint8_t *out, size_t *out_pos, size_t out_size)
static void rc_bittree(lzma_range_encoder *rc, probability *probs, uint32_t bit_count, uint32_t symbol)
static void rc_reset(lzma_range_encoder *rc)
static void rc_bittree_reverse(lzma_range_encoder *rc, probability *probs, uint32_t bit_count, uint32_t symbol)
static uint64_t rc_pending(const lzma_range_encoder *rc)
static void rc_flush(lzma_range_encoder *rc)
static void rc_bit(lzma_range_encoder *rc, probability *prob, uint32_t bit)
enum lzma_range_encoder::@658 symbols[RC_SYMBOLS_MAX]
Symbols to encode.
probability * probs[RC_SYMBOLS_MAX]
Probabilities associated with RC_BIT_0 or RC_BIT_1.
size_t count
Number of symbols in the tables.
size_t pos
rc_encode()'s position in the tables