			=== Filetype Info ==

name			offset			size		note

  == LGP - Final Fantasy 7, square ==
first is header, then there is library, then some data, and then files,
with file names and sizes at their beginning

ident1 			0				12		 	'\0\0SQUARESOFT'
files count		12				4			long
library			16				?			records
some data		?							(unknown)
file data       ?
ident2 			eof - 14		14			'FINAL FANTASY7'

Library record(27):
file name		0				20			'\0' padded
offset			20				4			offset to file data
info			24				3			?

File data (24+file size):
file name-again	0				20			'\0' padded
file size		20				4
file			24				file size

  == PAK - Quake 1, id ==
Header, then data and lib at the end

ident			0				4			'PACK'
lib offset		4				4
lib size		8				12			files count = size / 64
data			16				?			files
lib				?				lib size	records

Record(64):
file name		0				56			zero padded
offset			56				4
size			60				4

  == WAD - Doom, Id ==
Header can be 'IWAD' 'PWAD' or 'WAD2'. Wad2 has different record structure

ident			0				4			'IWAD' 'PWAD' or 'WAD2'
files count		4				4
lib offset		8				4
data
lib

Library WAD2 record (32):
offset			0				4
size			4				4
unknown			8				8
name			16				16			0 padded

Library IWAD, PWAD record (16):
offset			0				4
size			4				4
name			8				8

  == GRP - Duke Nukem 3d, id  ==
Grp does not have file offsets stored, so offset has to be calculated from
file sizes

ident			0				12          'KenSilverman'
files count		12				4
library			16				files*16
data			16 + files*16	..eof

Library Record (16):
file name		0				12
size			12				4

  == LBX - Princess Maker 2, Gainax ==
Data first, then lib and main info is at the end

data			0				?			file data
library			?
files count		eof-6			2
lib offset		eof-4			4

Library record (20):
name			0				12			' '(20h) padded
offset			12				4
size			16				4

  == VOL - Knights of Xentar, Megatech ==
no header or ident. Only that first offset should be % 100h = 0
At start of file there are offsets to files. First offset is also a size
of library. Sometimes some offsets following have the same values (skip
them). Unused offsets to end of library are zeroes. Last offset(s) points
to eof.

library			0				?			file offsets (long)
data			lib size		?			files

  == WTN - Moorhuhn 2, Witan ==
There is header, then data and library at the end. At start of library there
is one unknown long. In library, records can be of 2 types: files or dirs.
Dir record is shorter, last item is 'subfiles'. In this case, following
records are in that directory. In sub count are included only files and dirs
that are in that dir, not in sub dirs.
Offsets are xored by FFAA5533h, filesizes by 3355AAFFh, all file data are
xored with 88h

header			0				64
data			64				?			files
library			?				?

Header (64):
ident           0				56		 	"MUDGE4.008/19/2000Copyright by Witan Entertainment B.V."+0
lib head ofs	56				4			(0 at the offset)
lib rec ofs		60				4			(rec ofs = head ofs+4)

Lib record (13dir/25file+string):
rec_type		0				4			1dir/2file
?               4				1			0
name len        5   			4			can be 0, empty string
name            9				namelen		string
subfiles count  +0				4			?dir/1file
offset          +4			 	4  			xored by FFAA5533h
size            +8				4			xored by 3355AAFFh
?               +12				4			0

  == PAK - Dune 2, Westwood ==
There is library first, then one long = 0 (end of lib), and then data.

Lib record (5+name):
offset			0				4
name			4				len+1		0 at end

  == DAT - Moorhuhn 3, ? ==
First record is a header, it starts at ofs 0. Then lib continues,
untill it gets to last record, its name is '****'. Every file is 200h
aligned. Free space is filled with zeroes. At the end of file (200h aligned)
is one long, probably checksum

Lib record(64=40h):
name     		0				30h    		0 padded
offset   		30h				4
size     		34h				4
zero     		38h				8           0

first record (header, offs0):
'MH3 V1.0 '+0 padded
ofs = start of 1st file, size = 1

last record:
name '****'
ofs = start of first file, size = 0

  == SWN - S.W.I.N.E., ? ==
Header is first, then library and then data. Untested !
Offset is from Data start, so real file offset is 16 + lib size + offset

Header:
ident1          0               4           53 72 1A 1B 'Sr'
?				4				4
ident2			8				4			'PACK'
lib size		12				4			long

Lib record:
?				0				1
name length		1				1			0..255
name			2				namelen
offset			2+namelen		4			ulong
size			6+namelen		4			ulong
?				10+namelen		5

  == IDX, ? - RollCage, Psygnosis ==
There are two files here, idx is for offsets and filesizes, and other file
with same filename but different extension, for data. In index file there
is no header, just library.

Lib record:
offset			0				4
size			4				4
?				8				12
?				12				4

  == UMOD - Unreal Tournament, Epic ==
There is some info at the end of file, and then there is a library at offs
At that offset, there is one byte = number of records, and then lib follows

Eof-20:
?				-20				4			?
lib offset		-16				4			long
file size		-12				4			long
?				-8				4			(1)
?				-4				4			?

Lib rec:
name length		0				1			byte
name			1				namelen		string ASCIZ
offset			.				4
size   			.				4
?				.				4			(0/3, 3=system ?)

  == PBO - Operation Flashpoint, ? ==
No header, straight library, starts with filename. filenames are in ASCIZ.
Last lib entery has u2 = size = 0. After lib there are data.

Lib rec:
file name		0				?			string ASCIZ
?				namelen			12			?
?				.				4			?
file size		.				4			long

  == PAQ - Crimson land, 10tons (grim) ==
No lib, simple file. Header first, then file info, then file data, info, data, info, data ....

header			0				4			'paq' 00
recs follow till eof

Rec:
filename		0				?			ASCIZ filename
file size		?				4			unsigned long
filedata		?				file size

  == BIFF - Baldur's gate ==

header			0				8			'BIFFV1' 20 20
files count		8				4			long
?				12				4			long	0
?				16				4			long	14h

Recs:
number 0base	0				2			short
?				2				2			short
offset			4				4			long
size			8				4			long
?				12				4			long	

  == RES - Etherlords II ==
first there is a header (16 bytes), then data follow, and then there is record lib.
in record lib, first are offsets and sizes, and then there are inseparated filenames, 
in which filename offset points

header			0				4			3C E2 9C 01
files count		4				4			long
lib offset		8				4			long
?				12				4

 Lib rec (22 bytes):
?				0				4
file size		4				4
file offset		8				4			absolute offset
?				12				4
filename len	16				2
filename offset	18				4			offset into filenames block

  == DAT - Oni ==
first is header (64b), then lib follows, then some unknown block1 & block2, then data and 
at the end there is a name block

Header:
ident			0				20			1F 27 DC 33  DF BC 03 00  31 33 52 56  40 00 14 00  10 00 08 00
lib recs		20				4			long
block1 recs		24				4			long
block2 recs		28				4			long
data start		32				4			long
data size 		36				4			long
names offset	40				4			long
names size		44				4			long
?				48				4*4			longs

Lib Rec (20 bytes):
type			0				4			string
offset			4				4			relative
name offset		8				4			relative
size			12				4
?				16				2			short
?				18				2			short

Names Block Rec (? bytes):
type			0				4			string
name			4				?			ASCIZ string

  == FF8 ==


  == DAR - Metal Gear Solid ==

Header:
lib recs		0				4			long

Lib Rec:
name			0				?			ASCIZ, filepos 4b padded with 0
size			?				4			long
data			?				size
zero			?				1			00


  == MEA - Mirex Exe Archive ==

Created for packing additional files to EXEcutables.

original exe is also stored in lib (as 1st rec)

Header:
orig file size	eof-20			4			long
library offset	eof-16			4			long
files count		eof-12			4			long
file size		eof-8			4			long
ident			eof-4			4			"MEAF"

Lib Rec:
name			0				64			ASCIZ
offset			64				4			long
size			68				4			long
