Update to new bitarray API in the item code huffman decoding
This commit is contained in:
1 parent
21cf1be326
commit
f25180c3cf
1 file changed
+1
-1
@@ -62,7 +62,7 @@ decode_tree = decodetree(code)
|
||||
|
||||
|
||||
def decode(bits: bitarray, n) -> tuple[str, int]:
|
||||
text = "".join(itertools.islice(bits.iterdecode(decode_tree), n))
|
||||
text = "".join(itertools.islice(bits.decode(decode_tree), n))
|
||||
length = len(encode(text))
|
||||
return text, length
|
||||
|
||||
|
||||
Reference in new issue
Block a user