wiithon.formats.archive module

class wiithon.formats.archive.Archive(*args, **kwargs)[source]

Bases: Protocol

get_file(path)[source]
Parameters:

path (str)

Return type:

bytes

replace_file(path, data)[source]
Parameters:
Return type:

None

get_bytes()[source]
Return type:

bytes

class wiithon.formats.archive.Container(*args, **kwargs)[source]

Bases: Protocol

data: bytes
classmethod read(stream)[source]
Parameters:

stream (BinaryIO)

Return type:

Container

get_bytes()[source]
Return type:

bytes

wiithon.formats.archive.unwrap_containers(data, cls=None)[source]

Peel the compression layers, unless the caller asked for the container itself

Parameters:
Return type:

tuple[bytes, list[Container]]

wiithon.formats.archive.wrap_containers(data, containers)[source]
Parameters:
Return type:

bytes

wiithon.formats.archive.flush_archive_cache(patcher)[source]
Parameters:

patcher (WiiIsoPatcher)

Return type:

None

wiithon.formats.archive.resolve_read(patcher, path)[source]
Parameters:
Return type:

bytes

wiithon.formats.archive.resolve_write(patcher, path, new_data)[source]
Parameters:
Return type:

None