Boost logo

Boost Users :

From: François Mauger (mauger_at_[hidden])
Date: 2008-03-23 12:12:22


Hi

I have large amount of data to store/load from files.
I use boost::serialization library to do it.
It has very nice features.

I use version 1.33:
>>> libboost-serialization-dev 1.33.1-9ubuntu3.1

Checking different strategies to play with my data and i/o archives,
I met the following problem:
if I save several text_oarchives within the same
output file (a trick to break side-effects of memory tracking),
then the deserialization failed for there is
no separator between successive text archives.

I have to explicitely add a 'std::endl' in the output stream
to make it run.

This pb does not appear
with xml archives for the </tag> at the end is unambiguous
to parse the end of each archive.
I did not check for binary archives, but I guess there will be no pb.

For me a mandatory 'white' character
should be added as the last byte in a text output archive
(when destructor is invoked?).
This will make more coherent (symmetric!) in comparison
with xml/binary ars.
This is only a suggestion: I cannot imagine all the side-effects
such a strategy could imply.

A sample demo file is attached.

Thanks for your attention.

frc

-- 
Francois Mauger
Laboratoire de Physique Corpusculaire de Caen et Universite de Caen
ENSICAEN - 6, Boulevard du Marechal Juin, 14050 CAEN Cedex, FRANCE
e-mail: mauger_at_[hidden]
tel.: (0/+33) 2 31 45 25 12
fax: (0/+33) 2 31 45 25 49



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net