Welcome


The front page shows all the recent posts. To see a more organized view use the tabs above.


Specification - Schema

Posted by Alex at 5:13 PM

The definition is the most readable section here and is actually an XML text fragment. It begins at the file offset pointed to by the signature section. It ends when encountering a null byte.

Let's look at the XML from Control.4096.dat:


<file type="Control">
<header>
<field type="int" name="BytesPerCluster">
<field type="int" name="NextIndex">
<field type="int" name="NextDataOffset">
</header>
</file>

This is specifying the file type and defining the format of the header section. In this case, we can see the file type and the header fields. Each entry under the header tag is a specific reference to a field VALUE stored in the Header section. The type defines how we deserialize (or decipher) the value for that field.

Some schemas will also define the format for the records located in the Records section and the Alternate Records section. There can be multiple records in a Records section.

Fields types are not limited to simple intrinsic types, they can also be structures, and there can be more than one successively.

In addition, there can also be a sentinel, which defines the end of records. The sentinel must be of the same type as the first record type, for obvious reasons.

blog comments powered by Disqus