AWB File Blobs

class PyCriCodecsEx.awb.AWB(stream: str | BinaryIO)[source]

Bases: object

Use this class to return any AWB data with the getfiles function.

__init__(stream: str | BinaryIO) None[source]

Initializes the AWB object

Parameters:

stream (str | BinaryIO) – Source file path or binary stream

get_file_at(index) bytes[source]

Gets you a file at specific index.

get_files() Generator[bytes, None, None][source]

Generator function to yield all data blobs from an AWB.

class PyCriCodecsEx.awb.AWBBuilder(infiles: list[bytes], subkey: int = 0, version: int = 2, id_intsize=2, align: int = 32)[source]

Bases: object

Use this class to build AWB files from a list of bytes.

__init__(infiles: list[bytes], subkey: int = 0, version: int = 2, id_intsize=2, align: int = 32) None[source]

Initializes the AWB builder.

Parameters:
  • infiles (list[bytes]) – List of bytes to be included in the AWB file.

  • subkey (int, optional) – AWB subkey. Defaults to 0.

  • version (int, optional) – AWB version. Defaults to 2.

  • id_intsize (hexadecimal, optional) – Integer size (in bytes) for string lengths. Defaults to 0x2.

  • align (int, optional) – Alignment. Defaults to 0x20.

build() bytes[source]

Builds the AWB file from the provided infiles bytes.