Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2008-08-21 13:02:53


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,


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk