Yaz0

From Super Mario Galaxy wiki
Revision as of 04:47, 6 March 2023 by GalaxyMaster (talk | contribs) (Add links!)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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