From 640ece9c1dbff85e3d2297b3e185e4f1928b4c8e Mon Sep 17 00:00:00 2001 From: Elliot Nunn Date: Tue, 11 Dec 2018 12:25:35 +0800 Subject: [PATCH] Create compress/extract stubs --- macresources/FakeResDecompress.py | 17 +++++++++++++++++ macresources/main.py | 1 + 2 files changed, 18 insertions(+) create mode 100644 macresources/FakeResDecompress.py diff --git a/macresources/FakeResDecompress.py b/macresources/FakeResDecompress.py new file mode 100644 index 0000000..3e198ef --- /dev/null +++ b/macresources/FakeResDecompress.py @@ -0,0 +1,17 @@ +def GetEncoding(inf): + if not inf.startswith(b'\xA8\x9F\x65\x72'): + encoding = 'unknown' + elif inf[6] == 8: + encoding = 'DonnBits' + elif inf[6] == 9: + defprocID = int.from_bytes(len[8:10], byteorder='big', signed=True) + encoding = 'GreggyBits%d' % defprocID + return encoding + + +def DecompressResource(inf): + return inf + + +def CompressResource(inf, encoding): + return inf diff --git a/macresources/main.py b/macresources/main.py index ebc9654..87571b0 100644 --- a/macresources/main.py +++ b/macresources/main.py @@ -1,6 +1,7 @@ import collections import struct import enum +from FakeResDecompress import DecompressResource, CompressResource FAKE_HEADER_RSRC_TYPE = b'header' # obviously invalid