Skip to content

Commit

Permalink
parser: remove test code that wasn't meant to be pushed
Browse files Browse the repository at this point in the history
  • Loading branch information
m1stadev committed Apr 22, 2024
1 parent df25c84 commit 1c28959
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions pyimg4/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@
from .errors import CompressionError, UnexpectedDataError, UnexpectedTagError
from .types import Compression, KeybagType, Payload


def _lzss_compress(data: bytes) -> bytes:
return lzss.compress(data, ' ')


def _lzss_decompress(data: bytes) -> bytes:
return lzss.decompress(data, ' ')


if platform == 'Darwin':
import apple_compress

Expand Down Expand Up @@ -1183,7 +1174,7 @@ def _decompress_data(
self, data: bytes, compression: Compression, size: Optional[int] = None
) -> bytes:
if compression == Compression.LZSS:
return _lzss_decompress(data)
return lzss.decompress(data)

elif self.compression == Compression.LZFSE:
return _lzfse_decompress(self.data, size)
Expand Down Expand Up @@ -1310,7 +1301,7 @@ def compress(self, compression: Compression) -> None:

self.size = len(self.data)
if compression == Compression.LZSS:
comp_data = _lzss_compress(self.data)
comp_data = lzss.compress(self.data)
self._data = self._create_complzss_header(len(comp_data)) + comp_data

elif compression == Compression.LZFSE:
Expand Down

0 comments on commit 1c28959

Please sign in to comment.