Trait weezl::decode::CodeBuffer

source ·
trait CodeBuffer {
    // Required methods
    fn new(min_size: u8) -> Self;
    fn reset(&mut self, min_size: u8);
    fn bump_code_size(&mut self);
    fn next_symbol(&mut self, inp: &mut &[u8]) -> Option<u16>;
    fn refill_bits(&mut self, inp: &mut &[u8]);
    fn get_bits(&mut self) -> Option<u16>;
    fn max_code(&self) -> u16;
    fn code_size(&self) -> u8;
}

Required Methods§

source

fn new(min_size: u8) -> Self

source

fn reset(&mut self, min_size: u8)

source

fn bump_code_size(&mut self)

source

fn next_symbol(&mut self, inp: &mut &[u8]) -> Option<u16>

Retrieve the next symbol, refilling if necessary.

source

fn refill_bits(&mut self, inp: &mut &[u8])

Refill the internal buffer.

source

fn get_bits(&mut self) -> Option<u16>

Get the next buffered code word.

source

fn max_code(&self) -> u16

source

fn code_size(&self) -> u8

Implementors§