Serializes incoming C# object model into binary data for a Type-Safe INI Compiler.
- Concept of sections. Each section is given a strong type. Each section can contain the following:
- 3 Main Wire Types:
64-bit integer
,64-bit floating point value
,64-bit pointer
Primitives
:bool
,int8
,uint8
,int16
,uint16
,int32
,uint32
,int64
,uint64
->uint64
single
,double
->double
string
->8-byte pointer
to length-prefixed utf16 dataobject
->8-byte pointer
to another section (described by name)map<K, V>
-> sortedlist<K>
followed bylist<V>
whereK
must be either aprimitive type
or astring
.V
must be aprimitive type
,string
, orobject
, and cannot be alist<>
.set<K>
-> sortedlist<K>
list<Primitives>
list<string>
list<object>
- NOT Permitted:
list<list<object>
, butlist<someObject>
wheresomeObject
islist<object>
permitted.
- 8-bytes of Magic Number: 0x00, 0x00, 0x00, 0x00, 0x42, 0x49, 0x4E, 0x49
- Number Of Sections (8-bytes)
- Pointers to Section Names (Number Of Sections * 8-bytes) [NOTE: Parallel array with 4.]
- Pointers to Section Offsets (Number Of Sections * 8-bytes) [NOTE: Parallel array with 3.]
- Section Data
- Number Of Fields
- Field Data (Number of Fields * 8-bytes) [NOTE: Data can be inline in the case of
primitive types
, or pointers in the case ofobject
,string
,list<>
]