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§
Sourcefn decode(&self, encoded_data: Vec<Self::Symbol>) -> Result<BitVec, Self::Err>
fn decode(&self, encoded_data: Vec<Self::Symbol>) -> Result<BitVec, Self::Err>
Attempt to decode the data. If no errors, return a bit string
Sourcefn num_bits_per_symbol(&self) -> usize
fn num_bits_per_symbol(&self) -> usize
How many bits one symbol encodes