Yaz0 (Python)¶
Note
Because of the similarities between the C++ APIs and the Python APIs, only the former will be documented in detail. Please refer to the C++ documentation for more information.
oead supports Yaz0 decompression and fast compression (using syaz0)
Performance¶
Decompression performance is on par with existing Yaz0 decoders.
As of late December 2019, syaz0 is able to compress files much faster than existing Yaz0 encoders. Files that are representative of Breath of the Wild assets were compressed 20x to 30x faster than with existing public tools for an equivalent or better compression ratio, and 70-80x faster (with a slightly worse ratio) in extreme cases.
At the default compression level, file sizes are typically within 1% of Nintendo’s.
For detailed benchmarks, see the results files in the test directory of the syaz0 project.
API¶
-
class
oead.yaz0.
Header
¶ See also
oead::yaz0::Header
-
__init__
()¶ Initialize self. See help(type(self)) for accurate signature.
-
property
data_alignment
¶
-
property
magic
¶
-
property
reserved
¶
-
property
uncompressed_size
¶
-
-
oead.yaz0.
get_header
(data: BytesLike) → Optional[oead.yaz0.Header]¶ See also
oead::yaz0::GetHeader
-
oead.yaz0.
compress
(data: BytesLike, data_alignment: int = 0, level: int = 7) → oead.Bytes¶ See also
oead::yaz0::Compress
-
oead.yaz0.
decompress
(data: BytesLike) → bytes¶ See also
oead::yaz0::Decompress
-
oead.yaz0.
decompress_unsafe
(data: BytesLike) → bytes¶ See also
oead::yaz0::DecompressUnsafe