From 7cb9cbe33ab6ed3a7e3f6bccdc8306599d2de08d Mon Sep 17 00:00:00 2001 From: m1stadev Date: Mon, 29 Jul 2024 11:33:27 -0500 Subject: [PATCH] parser: IM4PData: account for all LZFSE magic values This prevented some iBootData IM4Ps from being correctly recognized as LZFSE-compressed --- pyimg4/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyimg4/parser.py b/pyimg4/parser.py index 2edb0a0..58b9c4b 100644 --- a/pyimg4/parser.py +++ b/pyimg4/parser.py @@ -1189,7 +1189,7 @@ def _detect_compression(self, size: int, data: bytes) -> None: elif data.startswith(b'complzss'): self._compression = Compression.LZSS - elif data.startswith(b'bvx2') and b'bvx$' in self.data: + elif data.startswith(b'bvx') and b'bvx$' in self.data: self._compression = Compression.LZFSE else: