Boost serialization stamp?
when you try to se开发者_如何学JAVArialize object data why do get 22 serialization::archive 7
in your serialized data? how do you get rid of it?
A bit late perhaps, but I was looking for the same thing so here goes =)
You should take a look at the no_header
flag documented here and used like this:
using namespace boost::archive;
std::stringstream stream;
text_oarchive archive(stream, no_header);
archive << object;
I'm assuming text archives here judging from your question but the same works for the other archive types.
Obviously one should consider carefully before using this since the self-documenting property of the archive is largely lost for a modest saving in space...
精彩评论