Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
lzma_decoder.c File Reference

LZMA decoder. More...

#include "lz_decoder.h"
#include "lzma_common.h"
#include "lzma_decoder.h"
#include "range_decoder.h"

Data Structures

struct  lzma_length_decoder
 Length decoder probabilities; see comments in lzma_common.h. More...
 
struct  lzma_lzma1_decoder
 

Macros

#define LZMA_IN_REQUIRED   20
 
#define len_decode(target, ld, pos_state, seq)
 
#define len_decode_fast(target, ld, pos_state)
 

Functions

lzma_ret lzma_lzma_decoder_create (lzma_lz_decoder *lz, const lzma_allocator *allocator, const lzma_options_lzma *options, lzma_lz_options *lz_options)
 
lzma_ret lzma_lzma_decoder_init (lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter_info *filters)
 Allocates and initializes LZMA decoder.
 
bool lzma_lzma_lclppb_decode (lzma_options_lzma *options, uint8_t byte)
 Decodes the LZMA Properties byte (lc/lp/pb)
 
uint64_t lzma_lzma_decoder_memusage_nocheck (const void *options)
 
uint64_t lzma_lzma_decoder_memusage (const void *options)
 
lzma_ret lzma_lzma_props_decode (void **options, const lzma_allocator *allocator, const uint8_t *props, size_t props_size)
 

Detailed Description

LZMA decoder.

Macro Definition Documentation

◆ len_decode

#define len_decode ( target,
ld,
pos_state,
seq )
Value:
do { \
case seq ## _CHOICE: \
rc_if_0_safe(ld.choice, seq ## _CHOICE) { \
rc_update_0(ld.choice); \
probs = ld.low[pos_state];\
target = MATCH_LEN_MIN; \
} else { \
rc_update_1(ld.choice); \
case seq ## _CHOICE2: \
rc_if_0_safe(ld.choice2, seq ## _CHOICE2) { \
rc_update_0(ld.choice2); \
probs = ld.mid[pos_state]; \
} else { \
rc_update_1(ld.choice2); \
probs = ld.high; \
} \
} \
symbol = 1; \
case seq ## _BITTREE: \
do { \
rc_bit_safe(probs[symbol], , , seq ## _BITTREE); \
} while (symbol < limit); \
target += symbol - limit; \
} while (0)
static uint32_t const uint8_t uint32_t uint32_t limit
Definition memcmplen.h:45
#define MATCH_LEN_MIN
Definition lzma_common.h:150
#define LEN_LOW_SYMBOLS
Definition lzma_common.h:159
#define LEN_MID_SYMBOLS
Definition lzma_common.h:161
#define LEN_HIGH_SYMBOLS
Definition lzma_common.h:163

◆ len_decode_fast

#define len_decode_fast ( target,
ld,
pos_state )
Value:
do { \
symbol = 1; \
rc_if_0(ld.choice) { \
rc_update_0(ld.choice); \
rc_bittree3(ld.low[pos_state], \
target = symbol; \
} else { \
rc_update_1(ld.choice); \
rc_if_0(ld.choice2) { \
rc_update_0(ld.choice2); \
rc_bittree3(ld.mid[pos_state], -LEN_MID_SYMBOLS \
target = symbol; \
} else { \
rc_update_1(ld.choice2); \
rc_bittree8(ld.high, -LEN_HIGH_SYMBOLS \
target = symbol; \
} \
} \
} while (0)

◆ LZMA_IN_REQUIRED

#define LZMA_IN_REQUIRED   20

Function Documentation

◆ lzma_lzma_decoder_create()

lzma_ret lzma_lzma_decoder_create ( lzma_lz_decoder * lz,
const lzma_allocator * allocator,
const lzma_options_lzma * options,
lzma_lz_options * lz_options )
extern

◆ lzma_lzma_decoder_init()

lzma_ret lzma_lzma_decoder_init ( lzma_next_coder * next,
const lzma_allocator * allocator,
const lzma_filter_info * filters )
extern

Allocates and initializes LZMA decoder.

◆ lzma_lzma_decoder_memusage()

uint64_t lzma_lzma_decoder_memusage ( const void * options)
extern

◆ lzma_lzma_decoder_memusage_nocheck()

uint64_t lzma_lzma_decoder_memusage_nocheck ( const void * options)
extern

◆ lzma_lzma_lclppb_decode()

bool lzma_lzma_lclppb_decode ( lzma_options_lzma * options,
uint8_t byte )
extern

Decodes the LZMA Properties byte (lc/lp/pb)

Returns
true if error occurred, false on success

◆ lzma_lzma_props_decode()

lzma_ret lzma_lzma_props_decode ( void ** options,
const lzma_allocator * allocator,
const uint8_t * props,
size_t props_size )
extern