MCPcopy Index your code
hub / github.com/TheAlgorithms/Rust / huffman_decode

Function huffman_decode

src/compression/huffman_encoding.rs:245–268  ·  view source on GitHub ↗

Decodes a Huffman-encoded string # Arguments `encoded` - The binary string to decode `codes` - HashMap of character to binary code mappings # Returns The decoded original string # Examples ``` # use std::collections::HashMap; # use the_algorithms_rust::compression::{huffman_encode, huffman_decode}; let text = "hello world"; let (encoded, codes) = huffman_encode(text); let decoded = huffman_d

(encoded: &str, codes: &HashMap<char, String>)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 5

test_simple_stringFunction · 0.85
test_unicode_charactersFunction · 0.85

Calls 4

pushMethod · 0.80
is_emptyMethod · 0.45
iterMethod · 0.45
getMethod · 0.45

Tested by 4

test_simple_stringFunction · 0.68
test_unicode_charactersFunction · 0.68