Struct hpack::huffman::HuffmanDecoder [] [src]

pub struct HuffmanDecoder {
    // some fields omitted
}

A simple implementation of a Huffman code decoder.

Methods

impl HuffmanDecoder
[src]

fn new() -> HuffmanDecoder

Constructs a new HuffmanDecoder with the default Huffman code table, as defined in the HPACK-draft-10, Appendix B.

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.