Somewhat:
make_freq_dict:
-keys in returned dict are same as supplied bytes
huffman_tree:
-number of internal nodes is one fewer than dict keys
get_codes:
-number of elements in returned dict is same as number in the tree; also calls huffman_tree
-Codes are all of length 1-255; also calls huffman_tree
number_nodes
-doesn't change tree shape
avg_length
-doesn't change tree or dictionary
generate_compressed
-doesn't change dictionary
tree_to_bytes
-doesn't modify tree
generate_tree_general
-generates tree of the same shape as original tree
generate_tree_postorder
-generates tree of the same shape as original tree
generate_uncompressed
-Generates same number of bytes as original
improve_tree
-doesn't modify dict
-----
tautology:
make_freq_dict:
-matches instructor
huffman_tree:
-average length matches instructor
get_codes:
-matches instructor
number_nodes:
-matches instructor
avg_length:
-matches instructor
generate_compressed:
-matches instructor
tree_to_bytes:
-matches instructor
generate_tree_general:
-matches original tree, even if nodes are permuted
generate_tree_postorder:
-matches original tree, even if node numbers are ruined
generate_uncompressed:
-matches original text
improve_tree:
-average length matches instructor
-doesn't change shape