[][src]Function httlib_huffman::parser::parse

pub fn parse(data: &str) -> Vec<(u16, u32)>

Parses the HPACK's static Huffman table. The function expects data to be in format as provided by the spec (7.2).

Example:

use std::fs;
use std::path::Path;
use httlib_huffman::parser::parse;
 
let path = Path::new("assets/hpack-huffman.txt");
let data = fs::read_to_string(path).expect("Can't read file.");
let codings = parse(&data);