PAK (Metroid Prime): Difference between revisions
Jump to navigation
Jump to search
→Compression
>Aruki m (→Compression) |
>Aruki |
||
Line 103: | Line 103: | ||
Metroid Prime 2 uses segmented LZO1X-999, and gets slightly more complicated. Metroid Prime 2's compressed files are split up into multiple segments of compressed data, each of which is 0x4000 bytes large when decompressed (except for the last one) and should be compressed and decompressed separately. Each segment begins with a 16-bit size value before its actual compressed data begins. | Metroid Prime 2 uses segmented LZO1X-999, and gets slightly more complicated. Metroid Prime 2's compressed files are split up into multiple segments of compressed data, each of which is 0x4000 bytes large when decompressed (except for the last one) and should be compressed and decompressed separately. Each segment begins with a 16-bit size value before its actual compressed data begins. | ||
Only certain formats are compressed. The following formats are always compressed: | |||
* [[TXTR (Metroid Prime)|TXTR]] | |||
* [[CMDL (Metroid Prime)|CMDL]] | |||
* [[CSKR (File Format)|CSKR]] | |||
* [[ANCS (File Format)|ANCS]] | |||
* [[ANIM (File Format)|ANIM]] | |||
* [[FONT (File Format)|FONT]] | |||
The following formats are compressed when their uncompressed size is at least 0x400 bytes: | |||
* [[PART (File Format)|PART]] | |||
* [[ELSC (File Format)|ELSC]] | |||
* [[SWHC (File Format)|SWHC]] | |||
* [[WPSC (File Format)|WPSC]] | |||
* [[DPSC (File Format)|DPSC]] | |||
* [[CRSC (File Format)|CRSC]] | |||
Additionally, in Prime 2 any files can be left uncompressed if the compressed file is larger than the uncompressed one. This is not the case in Prime 1 (although custom repacking implementations should probably do this regardless). | |||
== File Order == | == File Order == |