Encodes text using Huffman coding # Arguments `text` - The input string to encode # Returns A tuple containing: - The encoded binary string - A HashMap of character to binary code mappings # Examples ``` # use std::collections::HashMap; # use the_algorithms_rust::compression::huffman_encode; let (encoded, codes) = huffman_encode("hello"); assert!(!encoded.is_empty()); assert!(codes.contains_
(text: &str)
source not stored for this graph (policy: none)