pub fn HuffmanCodes(input: &str) -> PyResult<HashMap<char, String>>
Expand description

Generate Huffman codes for the input string

§Arguments

  • input - A string slice that holds the input text

§Returns

  • A dictionary with characters as keys and their corresponding Huffman codes as values