Hello,
Are there any settings or additional code required to optimize the serialization of std containers ?
I serialize a nested container: std::vector<std::deque<int>>. The max size of each deque entry is 20. I include boost/serialization/deque.hpp and boost/serialization/vector.hpp and I serialize the container in the following way:
std::ofstream ofs(outFileName);
boost::archive::binary_oarchive oa(ofs);
oa << data;
I created data with 10600 integers in the deque. The size of the serialized output file is 54493.
Now, I test an alternate serialization. I serialized the size of the vector and then per each entry I serialize its size, which cannot be more than 20, so char is enough for that, next I serialize the integers in this entry. The size of the serialized output file is 43484.
Is there a way to achieve better results for the default serialization ?
Thanks,
Gidi