bitstream_io::read

Trait HuffmanRead

Source
pub trait HuffmanRead<E: Endianness> {
    // Required method
    fn read_huffman<T>(&mut self, tree: &[ReadHuffmanTree<E, T>]) -> Result<T>
       where T: Clone;
}
Expand description

A trait for anything that can read Huffman codes of a given endianness from an input stream

Required Methods§

Source

fn read_huffman<T>(&mut self, tree: &[ReadHuffmanTree<E, T>]) -> Result<T>
where T: Clone,

Given a compiled Huffman tree, reads bits from the stream until the next symbol is encountered.

§Errors

Passes along any I/O error from the underlying stream.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<R: Read, E: Endianness> HuffmanRead<E> for BitReader<R, E>