how to write an octree to a file?

view full story

http://stackoverflow.com – I have been working on a small experiment making a SVO ray caster/ray tracer and to want to make a mesh --> octree converter. The only problem I can't seem to find a solution to is how to store a octree in a file in any meaning full way. The only results I've got is the .oct format witch has to be compiled, but i cant seem to find any documentation on how to actually create an octree in such a file(all i could find was how to compile with mkoctfile). Ideally i would like a way to store it in a normal file (not compiled as it seem to complicate things) so if someone knows if thats at all possi (HowTos)