Decoder

Trait Decoder 

Source
pub trait Decoder {
    type Symbol;
    type Err;

    // Required methods
    fn decode(
        &self,
        encoded_data: Vec<Self::Symbol>,
    ) -> Result<BitVec, Self::Err>;
    fn num_bits_per_symbol(&self) -> usize;
}
Expand description

To decode an array of symbols into bit string

Required Associated Types§

Required Methods§

Source

fn decode(&self, encoded_data: Vec<Self::Symbol>) -> Result<BitVec, Self::Err>

Attempt to decode the data. If no errors, return a bit string

Source

fn num_bits_per_symbol(&self) -> usize

How many bits one symbol encodes

Implementors§