Concepts

The vgio library provides an API to work with data stored in various video game files formats. The library is structured such that games are represented by subpackages and file formats are represented by modules.

Broadly speaking vgio places file formats into three categories.

Binary Data

Binary data is structured data that is written to a file as a sequence of bytes. It is common for the data structure to be composed of other data structures.

vgio represents the primary binary data object of the format as a ReadWriteFile object. Helper data structures have simple read(file) and write(file, object_) classmethods.

Archive Data

Archive data is a container for other types of data typically represented as files. The ArchiveFile and ArchiveInfo serve as base classes for working with such data. By design the ArchiveFile and ArchiveInfo interfaces are identical to Python’s ZipFile and ZipInfo interfaces respectively.

Markup Data

Markup data is data that is expressed as structured plain text. vgio modules that are markup based expose a similar interace as Python’s json module interface. Namely loads() and dumps().