Skip to content

Commit 3ebdcf8

Browse files
author
stuffacc
committed
format fix
1 parent 933c5d0 commit 3ebdcf8

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/7/huffman.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
from email.quoprimime import decodestring
2-
from locale import windows_locale
3-
4-
51
class Node:
62
def __init__(self, char, weight, left=None, right=None):
73
self.char = char
@@ -116,13 +112,12 @@ def decode_file(filepath):
116112
with open("decoded.txt", "w") as f:
117113
f.write(decoded_str)
118114

119-
str, table = encode("Hello fsdfdfsdfsdfsdfsdfsdfsdfdsfsdfdsfWorld")
120-
121-
decodestring = decode(str, table)
115+
string, table = encode("Hello fsdfdfsdfsdfsdfsdfsdfsdfdsfsdfdsfWorld")
122116

123-
print(decodestring)
117+
decoded_string = decode(string, table)
118+
print(decoded_string)
124119

125120

126121
encode_file("file.txt")
122+
decode_file("encoded.huff")
127123

128-
decode_file("encoded.huff")

0 commit comments

Comments
 (0)