omaonfpnac
This commit is contained in:
parent
83f56bca46
commit
06d4dcf070
@ -65,7 +65,7 @@ class HuffmanTree:
|
|||||||
|
|
||||||
def decode(self, bits):
|
def decode(self, bits):
|
||||||
if not bits:
|
if not bits:
|
||||||
return "
|
return ""
|
||||||
if self.root.left is None and self.root.right is None:
|
if self.root.left is None and self.root.right is None:
|
||||||
return self.root.data * len(bits)
|
return self.root.data * len(bits)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user