Add huffman encoding

This commit is contained in:
Carl Lerche
2017-06-01 12:35:20 -07:00
parent d3e4e036e3
commit e41349572a
5 changed files with 428 additions and 9 deletions

View File

@@ -1 +1,24 @@
pub struct Encoder;
use http::header::{HeaderMap, HeaderName, HeaderValue};
use bytes::BytesMut;
pub struct Encoder {
table: HeaderMap<()>,
// The remote sent a max size update, we must shrink the table on next call
// to encode.
max_size_update: Option<usize>,
// Current max table size
max_size: usize,
}
pub enum EncoderError {
}
impl Encoder {
pub fn encode<'a, I>(&mut self, headers: I, dst: &mut BytesMut) -> Result<(), EncoderError>
where I: IntoIterator<Item=(&'a HeaderName, &'a HeaderValue)>,
{
unimplemented!();
}
}