A
Andrew Poelstra
What would this buy him? He's saving the data to file, not to paper
or a text-only medium like Usenet. Apart from being able to print it,
base64 has exactly the same weaknesses as whatever binary representation
lies under the surface.
It restricts what characters are available as data, so that you
can use others as field separators, metadata, etc. This was also
my rationale for translating NULs.
If you write plain old binary data to a file, you have no way of
telling when one piece of data ends and another begins, what the
endianess is, what version of encoder was used, etc, etc.
And for debugging purposes text-readability is often very useful.
To the original poster, I have no general answer. I'd recommend some
format suited to his application, not to its current implementation.
Right now Jacob is working on building an extensive data structure
library for the C language and I suspect he is looking for the most
intelligent and most general method of serialization.
(I also suspect that no such thing exists.).