Hey 8-)
@Piru
More or less what I thought. I ended up not doing it though, as after trying it I discovered it would imply changes that wouldn't make the current algorithms I'm using faster.
@Karlos
Most of what you describe is more or less done :-) Still need to finish some parts and test/correct bugs though..
"versus offset into the file"
That screws up alignment a bit and is a problem I still don't know ver well how to solve. If you compile it with a different compiler or with different settings that alter the alignment it will make the resulting file format different.
"..as opposed to structuring it for saving is surely just laziness."
Someone called me ? :-D I end up rewriting and tweeking stuff sooner or later though, honestly.
"Of course, if it's just a whole bunch of binary data, who would know which value in there was a pointer in the first place?"
Because the loader uses that same data block descriptions of the saver. So if it's loading a part of a block that's described as a pointer to something it needs to know if the pointer actually pointed to something or not. If it did it's non NULL (and hence I could just dump the pointer for speed), and the data it points to follows.
That the use:) But I ended up just put 1 or 0 values in there.