PAK (Metroid Prime 3): Difference between revisions
→Compression
>Aruki |
>Aruki |
||
Line 154: | Line 154: | ||
|} | |} | ||
Each compressed block is structured as follows | Each compressed block is structured as follows. | ||
For each block, if the compressed and decompressed sizes match, that indicates the block is uncompressed. | For each block, if the compressed and decompressed sizes match, that indicates the block is uncompressed. | ||
Line 165: | Line 165: | ||
| 0x0 | | 0x0 | ||
| 1 | | 1 | ||
| '''Flag''' | | '''Flag''' | ||
|- | |- | ||
| 0x1 | | 0x1 | ||
Line 178: | Line 178: | ||
| colspan=2 {{unknown|End of entry}} | | colspan=2 {{unknown|End of entry}} | ||
|} | |} | ||
The flag value can be set to the following possible values: | |||
* If the block count is 1, it will be 0xA0 on block 1. | |||
* If blocks 2/3 are compressed, they will have it set to 0xC0. | |||
* If blocks 2/3 are uncompressed, they will have it set to 0x40. | |||
* 0 in all other circumstances. | |||
Files are left uncompressed if the compressed data is larger than the uncompressed data. Barring that, the following formats are always compressed: | Files are left uncompressed if the compressed data is larger than the uncompressed data. Barring that, the following formats are always compressed: |