Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-12-02 15:58:01


Chris . wrote:
> Hi, the serialization library is almost what im after. My only
> problem is that in the archive output additional data is added to the
> start of the archive (for example "22 serialization::archive" for
> text files). Is there any way of disabling this? In my case, I
> require a pure binary archive. Ideally i would like to write one if
> one doesnt exist but i'm not sure if i have time, depending on how
> hard it would be.

Use the "no_header" flag when you open the achive.

>
> How hard would it be do make my own archive type, where by i could
> set the endian field to convert bigendian to littleendian depending
> on what the user defines the 'archive endianess' to be on archive
> construction? I have done this with my own serialization library,
> however i dont want to extend that because it only handles c++
> primitives and dealing with pointers things start
> getting horrible very very quickly!

Take a look at the "portable_binary_archive" example. This shows
how to make your own archive by deriving from an existing one. Note
that the portable_binary_archive handles endian issues but does not
include portable floating point. If you need this, you'll have to finish
the example.

Good Luck

Robert Ramey


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