Rollcage 2 IMG: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 27: | Line 27: | ||
:: char {X} - Additional Information <br> | :: char {X} - Additional Information <br> | ||
:: byte {X} - Compressed Data <br> | :: byte {X} - Compressed Data <br> | ||
<br> | |||
Compressed Data: <br> | |||
: uint32 {4} - 'ControlBits' <br> | |||
: char {X} - Compressed Data <br> | |||
: uint32 {4} - 'ControlBits' <br> | |||
: char {X} - Compressed Data <br> | |||
: .. <br> | |||
<br> | |||
: The ControlBits say how to decompress the data. <br> | |||
:: Whether the Bit is 0 and the next Byte is not compressed, <br> | |||
:: or the Bit is 1 and the next Byte(s) is/are compressed. <br> | |||
:: If the next Byte(s) is/are compressed, the next ControlBit say how its compressed. <br> | |||
::: The Next Bit is 0: <br> | |||
:::: The decompressor reads the next Byte from the Data. <br> | |||
:::: This Byte AND FFFFFF00 say the decompressor how much bytes to go back. <br> | |||
:::: From that position the decompressor copies 2 bytes to the end of the already decompressed Data. <br> | |||
:::: If the next ControlBit is 1 the decompressor copies 2 additional Bytes. <br> | |||
:::: If the next ControlBit is 1 the decompressor copies 1 additional Byte. <br> | |||
::: The Next Bit is 1: <br> | |||
:::: | |||
</b></tt> | </b></tt> | ||
Revision as of 13:32, 21 October 2011
Choose archive extension:
IMG + IDX
- Format Type : Archive
- Endian Order : Little Endian
Format Specifications
// IDX FILE
- // for each file
- uint32 {4} - File Offset
- uint32 {4} - Compressed File Length
- uint32 {4} - Decompressed File Length
- uint32 {4} - Unused
- uint32 {4} - File Offset
// IMG FILE
- // for each file
- char {4} - File Header (GT20)
- uint32 {4} - Decompressed File Length
- uint32 {4} - Unused (Same as the Unknown ID field in the IDX File)
- uint32 {4} - Length of additional Information
- char {X} - Additional Information
- byte {X} - Compressed Data
- char {4} - File Header (GT20)
Compressed Data:
- uint32 {4} - 'ControlBits'
- char {X} - Compressed Data
- uint32 {4} - 'ControlBits'
- char {X} - Compressed Data
- ..
- The ControlBits say how to decompress the data.
- Whether the Bit is 0 and the next Byte is not compressed,
- or the Bit is 1 and the next Byte(s) is/are compressed.
- If the next Byte(s) is/are compressed, the next ControlBit say how its compressed.
- The Next Bit is 0:
- The decompressor reads the next Byte from the Data.
- This Byte AND FFFFFF00 say the decompressor how much bytes to go back.
- From that position the decompressor copies 2 bytes to the end of the already decompressed Data.
- If the next ControlBit is 1 the decompressor copies 2 additional Bytes.
- If the next ControlBit is 1 the decompressor copies 1 additional Byte.
- The decompressor reads the next Byte from the Data.
- The Next Bit is 1:
- The Next Bit is 0:
- Whether the Bit is 0 and the next Byte is not compressed,
MultiEx BMS
Not written yet
Notes and Comments
- The *.IDX file contains the directory, the *.IMG file contains the data