Update db_parsing.py (#54)

dst is type of *bytes*, and the return value should be catched.

Signed-off-by: Andy Zheng <imzy140@gmail.com>
This commit is contained in:
Andy Zheng 2023-12-24 12:55:10 +08:00 committed by GitHub
parent 4724dfa377
commit 9a9be2accf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,7 +155,7 @@ def decompress_CompressContent(data):
return None
try:
dst = lz4.block.decompress(data, uncompressed_size=len(data) << 8)
dst.decode().replace(b'\x00', '') # 已经解码完成后还含有0x00的部分要删掉要不后面ET识别的时候会报错
dst = dst.replace(b'\x00', b'') # 已经解码完成后还含有0x00的部分要删掉要不后面ET识别的时候会报错
uncompressed_data = dst.decode('utf-8', errors='ignore')
return uncompressed_data
except Exception as e: