Yaz0
Jump to navigation
Jump to search
This page contains content/info from various sources. This info may not be 100% correct. |
---|
Yaz0 is the compression format used by both Galaxy 1 and 2. Almost every game that has used the compression stores the file in a szs extension.
Format Specifications
Below you'll find helpful tables on how the file is structured
Header
Offset | Type | Description |
---|---|---|
0x00 | char[4] | "Yaz0" in ASCII |
0x04 | u32 | The size of the file decompressed |
0x08 | u8[8] | Padding |
Decoding
To decode the file, most programs run a loop checking the size and use a source position, a command byte, and a destination position. The source position starts at 0x10 (16), right after the header.
Encoding
Encoding is a bit more difficult than decoding, often doing byte and bit manipulation. The header is still written first with the actual file data starting at 0x10 (16), right after the header
External links
- Yaz0 compression spec: http://www.amnoid.de/gc/yaz0.txt
- szstools (includes yaz0dec): http://www.amnoid.de/gc/szstools.zip
- yaz0enc: http://www.amnoid.de/gc/yaz0enc.zip