pub struct HuffmanCodec { /* private fields */ }
Implementations§
Source§impl HuffmanCodec
impl HuffmanCodec
pub fn from_frequencies(freq_map: &HashMap<String, u64>) -> Result<Self, Error>
pub fn write_key_code( &self, key: &str, writer: &mut BitWriter, ) -> Result<(), Error>
pub fn decode_key(&self, reader: &mut BitReader<'_>) -> Result<String, Error>
pub fn try_get_code(&self, key: &str) -> Option<(u64, u8)>
Trait Implementations§
Source§impl Clone for HuffmanCodec
impl Clone for HuffmanCodec
Source§fn clone(&self) -> HuffmanCodec
fn clone(&self) -> HuffmanCodec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for HuffmanCodec
impl RefUnwindSafe for HuffmanCodec
impl Send for HuffmanCodec
impl Sync for HuffmanCodec
impl Unpin for HuffmanCodec
impl UnwindSafe for HuffmanCodec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more