Binary Format

OffsetNameTypeObservations
+0Magic(3 bytes)'FLM'
+3Format versionu8currently value 1
+4Number of fieldsu16Total number of fields (data members) in the structure
+6Structure versionOptionFor structures that have multiple version, this byte holds the current version of the structure
+7Serializarion flagsu88 bits that provide information on the data
+8DataThe actual data from the structure
+?Hash tableu32 * Number of fieldsA hash table for quick access to the data
+?Offset table? * Number of fieldsA table with indexes from where the data starts
+?Timestampu64Only if the TIMESTAMP flag was set
+?Unique IDu64Only if the UNIQUEID flag was set
+?Structure Name Hashu32Only if the MAKEHASH flag was set
+?Data checksumu32Only if CHECKSUM flag was set

Remarks:

  • The Magic field is used to identify the file format. It should always be 'FLM'.
  • The Structure version field is used to indicate the version of the structure. Version 0 means that the structure has no versioning.
  • The Serializarion flags field is a bitmask that provides information about the data. The following flags are currently supported:
    • TIMESTAMP: Indicates that the structure has a timestamp.
    • UNIQUEID: Indicates that the structure has a unique ID.
    • MAKEHASH: Indicates that the structure has a name hash.
    • CHECKSUM: Indicates that the structure has a checksum.
  • The first 2 bits from the Serializarion flags field are use for offset size (1, 2 or 4 bytes). Smaller structus usually use 1 byte offset (meaning that the endire data is less than 255 bytes), while larger structs use a 2 or 4 bytes offset.