libgamearchive provides a standard interface to access different game data "archives" regardless of their file format. Just like a .zip file, many games squash all their data files together into one big file, and this library provides access to those single big files. Files can be listed and extracted, as well as added, removed, renamed and rearranged.
The main interface to the library is the getManager() function, which returns an instance of the Manager class. The Manager is used to query supported archive formats, and for each supported file format it returns an instance of the ArchiveType class.
The ArchiveType class can be used to examine files and check what file format they are in, and if they are in the correct format, to open them. Successfully opening an archive file produces an instance of the Archive class. The ArchiveType class can also be used to create new archives from scratch, which will again return an Archive instance.
The Archive class is used to directly manipulate the archive file, such as by adding and removing files.
The libgamearchive distribution comes with example code in the form of the gamearch utility, which provides a simple command-line interface to the full functionality of the library.
For a small "hello world" example, try this:
When run, this program produces output similar to the following:
Found 456 files. LOGO.ANM CINEOV2.ANM CINEOV3.ANM RADLOGO.ANM DUKETEAM.ANM VOL41A.ANM VOL42A.ANM VOL43A.ANM VOL4E1.ANM ... Done.
Additional information is available from the Camoto homepage http://www.shikadi.net/camoto.