Trait CodeLen

Source
pub trait CodeLen {
    // Required method
    fn len(&self, value: u64) -> usize;
}
Expand description

A trait providing a generic method to compute the length of a codeword.

Required Methods§

Source

fn len(&self, value: u64) -> usize

Return the length of the codeword for value.

Implementors§

Source§

impl CodeLen for Codes

Source§

impl CodeLen for FuncCodeLen

Here we do not depend on the bitstream, so there is no need for a “static” version of the trait.

Source§

impl<const CODE: usize> CodeLen for ConstCode<CODE>