I am working on a project, for which I want to create my own file format to store large amounts of data. I am trying to decide how that file format should be built to be as efficient as possible.
The data I want to store is basically a big data structure.
The idea I am currently examining, is storing the data in a way similar to a combination of XML and python. For example:
<Object1> <InnerObject1> <InnerInnerObject1> variable1 = 31415 variable2 = "Hello World!!!" </InnerInnerObject1> </InnerObject1> <InnerObject2> variable1 = "abcd" variable2 = 17 </InnerObject2> </Object1>
,where the Tags correspond to class-names and the variables to variables.
Considering the time requirements of XML parsers, I am not sure if storing the data this way would allow for fast enough reading.
My question is essentially the following: How exactly do other file formats that store significant amounts of data work, for example MP4 or OBJ? And I am not talking about the compressiong or something like that, but the exact way the data is stored, such that the reading program knows which data to put where in memory.
Thanks for any help in advance!