c++ - Boost serialization does not work between 32bit and 64bit machine. Any other serialization / compression library? -


i trying use boost library serialize on 64bit machine , de-serialize on 32bit machine. however, seems not work. (i use 1.57.0).

if run following code

boost::asio::streambuf buf; std::ostream os(&buf); boost::archive::binary_oarchive oa(os); printf("buffer size %d\n",(int)buf.size()); 

the output of 32bit machine 37 , output of 64bit machine 41.

is there other serialize library can use? how cereal?

it's great if library can compression (zlib/gzip etc.).

it work. doesn't create compatible archives. if want should @ archive implementation eos made:

you can drop-in replace boost's binary_[io]archive it. no need change else.


ps. of course, spell out types in architecture-independent way too, of course. uint32_t, not ``size_t`


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Website Login Issue developed in magento -

Can the constants be defined inside a model file of a framework in PHP? -