Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2006-01-23 14:39:37

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

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at