Skip to main content

LhaDecoderConfig

Trait LhaDecoderConfig 

Source
pub trait LhaDecoderConfig {
    type RingBuffer: RingBuffer;

    const HISTORY_BITS: u32;
    const OFFSET_BITS: u32;
}
Expand description

LHArc version 2 configuration for LhaV2Decoder.

Required Associated Constants§

Source

const HISTORY_BITS: u32

The code lengths table size for building the offset tree.

The value of this number is determining the maximum size of the history sliding window. E.g for 8192 byte sliding window set this to 14.

This has to be no greater than MAX_HISTORY_BITS.

Source

const OFFSET_BITS: u32

This number of bits is read to determine the size of the actual offset code length table.

This is currently limited to be between 1 and 5 inclusive.

Required Associated Types§

Source

type RingBuffer: RingBuffer

A ring buffer object of size equal to 2 to the power of (Self::HISTORY_BITS - 1).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl LhaDecoderConfig for Lh5DecoderCfg

Source§

const HISTORY_BITS: u32 = 14

Source§

const OFFSET_BITS: u32 = 4

Source§

type RingBuffer = RingArrayBuf<{1u32.strict_shl($history_bits - 1) as usize}>

Source§

impl LhaDecoderConfig for Lh7DecoderCfg

Source§

const HISTORY_BITS: u32 = 17

Source§

const OFFSET_BITS: u32 = 5

Source§

type RingBuffer = RingArrayBuf<{1u32.strict_shl($history_bits - 1) as usize}>

Source§

impl LhaDecoderConfig for LhxDecoderCfg

Source§

const HISTORY_BITS: u32 = 20

Source§

const OFFSET_BITS: u32 = 5

Source§

type RingBuffer = RingArrayBuf<{1u32.strict_shl($history_bits - 1) as usize}>