pyctr.type.save.partdesc.common module

exception pyctr.type.save.partdesc.common.PartitionDescriptorError[source]

Bases: PyCTRError

Generic error for operations related to DIFI, IVFC, or DPFS.

exception pyctr.type.save.partdesc.common.InvalidHeaderError[source]

Bases: PartitionDescriptorError

The header is invalid.

exception pyctr.type.save.partdesc.common.InvalidHeaderLengthError[source]

Bases: InvalidHeaderError

Length of the header is invalid.

class pyctr.type.save.partdesc.common.LevelData(offset, size, block_size_log2, block_size)[source]

Bases: NamedTuple

Level data used by IVFC and DPFS.

Parameters:
  • offset (int)

  • size (int)

  • block_size_log2 (int)

  • block_size (int)

offset: int

Offset of the level.

size: int

Size of the final level.

block_size_log2: int

Block size in log2.

block_size: int

Actual block size.

pyctr.type.save.partdesc.common.get_block_range(offset, size, block_size)[source]
Parameters:
pyctr.type.save.partdesc.common.read_le_u32_array(data)[source]

Yields each little-endian u32 in a block of data.

Parameters:

data (bytes)