Fix bytes_align ?

This commit is contained in:
Gabriel GRONDIN 2021-11-17 16:46:15 +01:00 committed by GitHub
parent d1d08921e3
commit 267cf14d18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,12 +58,8 @@ def pzz_decompress(compressed_bytes: bytes):
def bytes_align(bout: bytes): def bytes_align(bout: bytes):
success = False while not hex(len(bout)).endswith("000"):
while not success: bout.extend(b"\x00")
bout.extend(b"\x00\x00")
address = len(bout)
if hex(address).endswith("00"):
break
def pzz_compress(b): def pzz_compress(b):