Posted by Stealth on March 17, 1998 at 17:24:43:
In Reply to: GOB file questions posted by Dr. GrooveuX on March 17, 1998 at 17:02:37:
> OK, so I've been messing around with the GOB file format and such...
> I was wondering if any VisualC++ programmers out there know if the GOB file format is compatible with the MFC serialization of the CArchive class. If not, is it atleast compatible with CFile?
Don`t know jack about c++ file classes or C for that matter..
A gob is just a binary file you can read in as records.
1. the main header record
2. the items records(filenames & offsets etc for the filedata inside)
3. file data records
The directories are stored as filepaths in the item records.
You need to read the main header (16 bytes) to get the number of files inside the gob
Then read 128 bytes for each file in the gob, This contains the filepath(name) size of file and starting offset from the begining of the file ( for each file inside of the gob)
Finally you position yourself at the offset and read the size in bytes for the file you want.
So What ever class you can do this sort of thing with in C++ is what you should use.