summaryrefslogtreecommitdiff
path: root/tools/compressed_data_extractor.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/compressed_data_extractor.py')
-rw-r--r--tools/compressed_data_extractor.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/compressed_data_extractor.py b/tools/compressed_data_extractor.py
index 71b2d31..422e887 100644
--- a/tools/compressed_data_extractor.py
+++ b/tools/compressed_data_extractor.py
@@ -41,6 +41,7 @@ def getCompressedData(offset):
cmdByte = getByte(pos)
pos += 1
data.append(cmdByte)
+ print('{:0x}'.format(cmdByte))
for bit in range(8):
if (cmdByte & (1 << (7 - bit)) != 0):
@@ -69,6 +70,11 @@ def getCompressedData(offset):
# the decompression might finish while still
# reading command bits, so break early when this happens
if (size == 0):
+ if not repeatToggle:
+ # extra bytes to match source
+ data.append(getByte(pos))
+ data.append(getByte(pos + 1))
+
break
return bytes(data)