[1.35] using binary_oarchive instead of text_oarchive

Dear members, I'm trying to use binary_oarchive instead of text_oarchive because I expect using binary may decrease the size of archive compare to using text_oarchive. std::ostreamstream ostr; boost::archive::text_oarvhice oa (ostr); oa & foo; The codes above works fine and I could do deserialization as well without any problem. In this case if I want to use binary_oarchive, what codes should I have to add? Any suggestion or advice will be appreciated. Thank you very much at all time. regards, -- Alexander Dong Back Kim

you shouldn't have to change anything. Just use: std::ostreamstream ostr(std::io_binary); boost::archive::binary_oarvhice oa (ostr); oa & foo; Robert Ramey Alexander Dong Back Kim wrote:
Dear members,
I'm trying to use binary_oarchive instead of text_oarchive because I expect using binary may decrease the size of archive compare to using text_oarchive.
std::ostreamstream ostr; boost::archive::text_oarvhice oa (ostr); oa & foo;
The codes above works fine and I could do deserialization as well without any problem. In this case if I want to use binary_oarchive, what codes should I have to add?
Any suggestion or advice will be appreciated. Thank you very much at all time.
regards,
participants (2)
-
Alexander Dong Back Kim
-
Robert Ramey