display-name: "Games/EPFS archive"
meta: {"Working": "Packed file extraction"}

file-format archive-epfs
{
	unsigned32 signature //EPFS
	unsigned32 fat-offset
	unsigned8 unknown
	unsigned16 file-count

	data-start: 11 //current location

	at fat-offset:

	file [file-count]
	{
		fixed-string(13) name
		unsigned8 compression-flag
		unsigned32 size
		unsigned32 decompressed-size

		if (compression-flag == 1)
		{
			lz-readmethod: "8LToH"
			lz_resetfull: false
			lz-maxbits: 14
			lz-epf: true
			compressed "LZW"
		}
	}	
}

if (file.name like "*.epf")
{
	interpret-as "archive-epfs"
}