U9fix13
This commit is contained in:
parent
9915b2ebc5
commit
dd7dcb379f
@ -74,6 +74,8 @@ class HuffmanTree:
|
||||
def decode(self, bits):
|
||||
if self.root is None:
|
||||
return ""
|
||||
if self.root.left is None and self.root.right is None:
|
||||
return self.root.data * len(bits)
|
||||
decodtext = ""
|
||||
node = self.root
|
||||
for i in bits:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user