Author Topic: Internal Data Formats  (Read 1564 times)

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Internal Data Formats
« on: December 07, 2004, 11:44:14 PM »
Hmm..., very interesting. The VOL files do support other compression formats. The compression code ranges from 0-3 (and it's only 1 byte). I'm not yet sure what the other codes do or what happens when a value above 3 is used. I've also found some interesting inheritance relationships between classes.





Layout of Internal Classes
--------------------------

Note: ClassA:ClassB denotes that ClassB is drived from ClassA. (Opposite to C++ convention)


StreamIO:???:VolFile
----------------

Note: VolFile derives (indirectly) from StreamIO. (Distance of 1)

Offset    Size    Description
------    ----    -----------
0x0   4   vtbl - 0x4D6B20
0x4   4   
0x8   4   streamStatus - A nonzero value denotes an error
- - - - - - - - - - - - - -   <- End of StreamIO base class variables
0xC   4   int numIndexEntries
0x10   4   IndexEntry *indexTable - allocated memory to hold index table
0x14   4   void *fileNameBuffer - buffer containing all internal file names as a list of NULL terminated strings
0x18   4   LPVOID mappedAddress - memory address of memory mapped file
0x1C   4   HANDLE fileMapping - handle to the file mapping object
0x20   4   HANDLE fileHandle - handle to opened VOL file
0x24   4   DWORD fileSize - size of the opened VOL file (-1 for unspecified)
0x28   4   StreamIO *decompressor - points to decompression object for opened stream (One of the contained objects below)
0x2C   ?   StreamIO:??? inputStream - input stream for all VolFile data?
0x44   ?   StreamIO:Case0Decompressor (Uncompressed raw data)
0x64   ?   StreamIO:Case1Decompressor (Unknown **TODO** explore this)
0xFC   ?   StreamIO:Case3Decompressor (AdaptiveHuffman+RepeatedBlocks)
0x128   ?   StreamIO:Case2Decompressor (Unknown **TODO** explore this)
0x158   4   boolSetFileSize - if nonzero, sets the file size to fileSize variable when opened
0x160   ?   (Internal object?)

Note: VolFile can have only one open stream at a time.
Note: VolFile derives from StreamIO and is useable to refer to it's opened stream



StreamIO
--------

Offset    Size    Description
------    ----    -----------
0x0   4   vtbl - 0x4D74FC
0x4   4   
0x8   4   int streamStatus - A nonzero value denotes an error
---------------------------
« Last Edit: June 25, 2018, 12:52:53 AM by Hooman »