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