SARC (Python)


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.


class oead.Sarc
__init__(self: oead.Sarc, data: BytesLike) → None
get_data_offset(self: oead.Sarc) → int
get_endianness(self: oead.Sarc) → oead.Endianness
get_file(*args, **kwargs)

Overloaded function.

  1. get_file(self: oead.Sarc, name: str) -> Optional[oead.File]

  2. get_file(self: oead.Sarc, index: int) -> oead.File

get_files(self: oead.Sarc) → iterator
get_num_files(self: oead.Sarc) → int
guess_min_alignment(self: oead.Sarc) → int
class oead.SarcWriter
class FileMap
__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: oead.SarcWriter.FileMap) -> None

  2. __init__(self: oead.SarcWriter.FileMap, iterator: iterator) -> None

  3. __init__(self: oead.SarcWriter.FileMap, dictionary: dict) -> None

clear(self: FileMap) → None
get(self: FileMap, key: str, default: Optional[oead.Bytes] = None) → Optional[oead.Bytes]
items(self: FileMap) → iterator
keys(self: FileMap) → iterator
class Mode




Legacy = Mode.Legacy
New = Mode.New
__init__(self: oead.SarcWriter.Mode, arg0: int) → None
property name

handle) -> str



__init__(self: oead.SarcWriter, endian: oead.Endianness = Endianness.Little, mode: oead.SarcWriter.Mode = Mode.New) → None
add_alignment_requirement(self: oead.SarcWriter, extension_without_dot: str, alignment: int) → None
property files
static from_sarc(archive: oead.Sarc) → oead.SarcWriter
set_endianness(self: oead.SarcWriter, endian: oead.Endianness) → None
set_min_alignment(self: oead.SarcWriter, alignment: int) → None
set_mode(self: oead.SarcWriter, mode: oead.SarcWriter.Mode) → None
write(self: oead.SarcWriter) → Tuple[int, oead.Bytes]