Thursday, September 14, 2023

Lucasfilm Games Archive Format


Byte offset Length Description
-- ALL ARCHIVE FILES --------------------------------------------------------------
0000 4 'LFG!'
0004 4 Length of this part of archive file.*

-- FIRST ARCHIVE FILE ONLY --------------------------------------------------------
0008 14 Archive filename, zero terminated. 
Max 12 characters; last byte ignored.
0016 2 Number of disks (archive files) that make up the  total archive. Valid range is 1-10. 
Upper byte ignored.*
0018 4 Total space needed for all expanded files.*

-- FILE DATA, REPEATED FOR EACH FILE IN ARCHIVE -----------------------------------
4 'FILE'
4 Length of data that follows for the compressed  file, until next 'FILE' marker or archive end.*
14 Filename, zero terminated. Max 12 characters; 
last byte ignored.
4 Final length of this file when expanded.*
2 2 - Meaning unknown. May be version numbers  (major/minor/build, etc.). Ignored.
2 1 - See above. Ignored.
2 0 - See above. Ignored.
variable ... Compressed File Data, using PKZ 'implode' ...
-----------------------------------------------------------------------------------
*All multi-byte values are stored least-significant byte first. All lengths are in bytes.

(This table was a result of the work in Adventures in Useless Reverse Engineering, I just never posted it.)