23 Jan
2006
23 Jan
'06
7:39 p.m.
I think the most practical way would be to try to create and archive with the "suspect" stream. construction of an archive from a stream reads the serialization header. If the header doesn't contain what is expected - I think an exception is thrown. Now that I read the above, it makes me wonder if that's a good idea - but there it is. Robert Ramey Bo Peng wrote:
Dear list,
What would be a good way to tell if a file is saved by boost::serialization? I notice that the first several characters of binary_oarchive saved files are "\026 \0 \0 \0 \0 \0 \0 serialization" and are "22 serialization" for text_oarchive saved files. Are they reliable signatures?
Many thanks in advance. Bo