DML Tables

This is a binary format which is used most notably for LatestFileList.bin.

All integers are in little-endian byte order unless otherwise specified.

Type Tag

When binary-serialized, the subsequent values of field types are identified by a tag value dynamically. The following maps tags to their respective DML types:

TagType
0GID
1INT
2UINT
3FLT
4BYT
5UBYT
6USHRT
7DBL
8STR
9WSTR

Message Orders

DML tables at present only use message types defined in the ExtendedBaseMessages protocol.

IndexType
1MSG_CUSTOMDICT
2MSG_CUSTOMRECORD

Structure

The following documents the outline of a serialized table blob.

Table

This structure and everything it encapsulates should be read as many times as needed until EOF is reached.

NameTypeDescription
ValuesLengthUINTLength of the Values array
ValuesValue[]Array of Value structures

Value

NameTypeDescription
ProtocolIDUBYTID of ExtendedBaseMessages protocol (always 2)
-UBYTType of structure that follows according to the Message Order
SizeUSHRTSize of this structure including everything it encapsulates

RecordTemplate

NameTypeDescription
RecordFieldsRecordField[]Array of RecordField structures

RecordField

NameTypeDescription
LengthUSHRTLength prefix of Name
NameSTRName of the field
If the name is _TargetTable then the TargetTable structure should be read after this structure
TypeUBYTType of the field according to the Type Tags table
?UBYTDML flags; implementation-specific

TargetTable

This is assumed to always be part of a RecordTemplate as part of the specification.

NameTypeDescription
LengthUSHRTLength prefix of Name
NameSTRThe table that Records of this type should belong to

Record

NameTypeDescription
--Values should be read according to the RecordFields in the preceding RecordTemplate