Sango Fighter RLC Compression
Jump to navigation
Jump to search
Sango Fighter RLC Compression
Format type | Compression algorithm |
---|---|
Type | Stream |
I/O unit size | 1-byte |
Games |
Some Sango Fighter files are compressed using a simple run-length encoding scheme. The files typically have the .rlc ("Run Length Coded") extension.
To decode the files, perform the following procedure:
- Read a byte
- If the byte is < 128, output the byte and go back to step 1
- Otherwise (i.e. the byte is >= 128)
- Take the lower 7 bits (val & 0x7F) and store this as count
- Read the next byte, and repeat it count times
- Go back to step 1
Example:
01 02 82 03 81 82
Becomes:
01 02 03 03 82