pub struct HuffmanDecoder { /* private fields */ }Expand description
A simple implementation of a Huffman code decoder.
Implementations§
Source§impl HuffmanDecoder
impl HuffmanDecoder
Sourcepub fn new() -> HuffmanDecoder
pub fn new() -> HuffmanDecoder
Constructs a new HuffmanDecoder with the default Huffman code table, as defined in the HPACK-draft-10, Appendix B.
Sourcepub fn decode(&mut self, buf: &[u8]) -> HuffmanDecoderResult
pub fn decode(&mut self, buf: &[u8]) -> HuffmanDecoderResult
Decodes the buffer buf into a newly allocated Vec.
It assumes that the entire buffer should be considered as the Huffman encoding of an octet string and handles the padding rules accordingly.
Auto Trait Implementations§
impl Freeze for HuffmanDecoder
impl RefUnwindSafe for HuffmanDecoder
impl Send for HuffmanDecoder
impl Sync for HuffmanDecoder
impl Unpin for HuffmanDecoder
impl UnwindSafe for HuffmanDecoder
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