arlmet.IndexRecord.from_position#

classmethod IndexRecord.from_position(file, position)[source]#

Create an IndexRecord by reading from a file at a specific position.

Parameters:
  • file (BinaryIO) – The file to read from.

  • position (int) – The byte position in the file where the index record starts.

Returns:

The parsed IndexRecord object.

Return type:

IndexRecord

Raises:
  • EOFError – If position is at the end of the file.

  • ARLFormatError – If the bytes at position are not a valid index record.