Update to new bitarray API in the item code huffman decoding
This commit is contained in:
@@ -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