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

Function generate_codes

src/compression/huffman_encoding.rs:167–185  ·  view source on GitHub ↗

Traverses the Huffman tree to generate binary codes for each character # Arguments `node` - The current node being traversed `code` - The current binary code string `codes` - HashMap to store the generated codes

(node: &HuffmanNode, code: String, codes: &mut HashMap<char, String>)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

huffman_encodeFunction · 0.85

Calls 2

insertMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected