libWiiPy.archive.ash Module#
The libWiiPy.archive.ash
module provides support for handling ASH files, which are a compressed format primarily used in the Wii Menu, but also in some other titles such as My Pokémon Ranch.
At present, libWiiPy only has support for decompressing ASH files, with compression as a planned feature for the future.
Module Contents#
- libWiiPy.archive.ash.decompress_ash(ash_data: bytes, sym_tree_bits: int = 9, dist_tree_bits: int = 11) bytes #
Decompresses the data of an ASH file and returns the decompressed data.
With the default parameters, this function can decompress ASH files found in the files of the Wii Menu and Animal Crossing: City Folk. Some ASH files, notably the ones found in the WiiWare title My Pokémon Ranch, require setting dist_tree_bits to 15 instead for a successful decompression. If an ASH file is failing to decompress with the default options, trying a dist_tree_bits value of 15 will likely fix it. No other leaf sizes are known to exist, however they might be out there.
- Parameters:
ash_data (bytes) – The data for the ASH file to decompress.
sym_tree_bits (int, option) – Number of bits for each leaf in the symbol tree. Defaults to 9.
dist_tree_bits (int, option) – Number of bits for each leaf in the distance tree. Defaults to 11.