Difference between revisions of "YBZ & YLZ (File Formats)"
Jump to navigation
Jump to search
(Created page with "'''YBZ''' and '''YLZ''' are alternative file formats. They use the Yaz0 header, but ''bzip2'' and ''LZMA'' for compression. == Introduction == The idea of these two file...") |
|||
Line 1: | Line 1: | ||
− | '''YBZ''' and '''YLZ''' are alternative file formats. They use the [[Yaz0]] header, but ''bzip2'' and ''LZMA'' for compression. | + | '''YBZ''' and '''YLZ''' are alternative file formats. They use the [[Yaz0]] header, but ''bzip2'' and ''LZMA'' for compression. |
== Introduction == | == Introduction == | ||
− | |||
− | The distinction between the three | + | Both file formats were developed by [[Wiimm]]. The idea of them is that Mario Kart Wii can handle them normally because of the [[Yaz0]] header. The type of compression must only be recognized during decoding. Therefore, only the {{code|decodeSZS()}} function needs to be overloaded and, if necessary, an alternative decoding method needs to be used. [[LE-CODE]] only supports YLZ. |
+ | |||
+ | The distinction between the three methods of compression is based on the first bytes of the compressed data. | ||
* If the first 3 bytes are {{code|BZh}} ({{code|0x42 0x5a 0x68}}), then it is bzip2 compression. | * If the first 3 bytes are {{code|BZh}} ({{code|0x42 0x5a 0x68}}), then it is bzip2 compression. | ||
* If the first 3 bytes are {{code|0x5d 0x00 0x00}}, then this is LZMA compression. | * If the first 3 bytes are {{code|0x5d 0x00 0x00}}, then this is LZMA compression. | ||
* Otherwise it is Yaz0 compression. This is always clear because bit 0x80 is always set in the first byte in the Yaz0 compression, but not in the other two compression methods. | * Otherwise it is Yaz0 compression. This is always clear because bit 0x80 is always set in the first byte in the Yaz0 compression, but not in the other two compression methods. | ||
+ | |||
+ | [[Wiimms SZS Tools]] since v2.42a will support the new file formats. | ||
== File header == | == File header == |
Revision as of 10:56, 10 March 2024
YBZ and YLZ are alternative file formats. They use the Yaz0 header, but bzip2 and LZMA for compression.
Introduction
Both file formats were developed by Wiimm. The idea of them is that Mario Kart Wii can handle them normally because of the Yaz0 header. The type of compression must only be recognized during decoding. Therefore, only the decodeSZS() function needs to be overloaded and, if necessary, an alternative decoding method needs to be used. LE-CODE only supports YLZ.
The distinction between the three methods of compression is based on the first bytes of the compressed data.
- If the first 3 bytes are BZh (0x42 0x5a 0x68), then it is bzip2 compression.
- If the first 3 bytes are 0x5d 0x00 0x00, then this is LZMA compression.
- Otherwise it is Yaz0 compression. This is always clear because bit 0x80 is always set in the first byte in the Yaz0 compression, but not in the other two compression methods.
Wiimms SZS Tools since v2.42a will support the new file formats.
File header
???