Boost logo

Boost Users :

From: François Mauger (mauger_at_[hidden])
Date: 2008-06-27 16:13:18


Hi all

[Sorry Daryle, this is not an answer to your problem but
another question related to it!]

Is there a plan to support std::bitset in the boost::s10n library
as it is the case for vector/list/map... containers?

regards

frc

--
>>> On Fri, June 27, 2008 9:20 pm, Daryle Walker wrote:
> My class contains an array of bits, currently expressed as
> boost::array<bool, 512>.  Will archives compact representations to
> multiple bits per serialized atom, or will they potentially waste a lot of
> space?
>
> Regardless of the answer, I was thinking of compacting the data
> myself.  One way would be to compact the array into boost::array<unsigned
> char, CEIL(512 / CHAR_BIT)> and serialize that.  But I've wondered what
> happens between systems with differing CHAR_BIT values.  The solution I'm
> leaning towards is to create a text string like base-64 (pack every 6 bits
> together) and serialize that.  By the way, a bit stream may not use all
> 512 bits and I'm also
> tracking (and serializing) a length attribute.  I guess I should make sure
> that the length is serialized first.  How do I serialize an arbitrary text
> string?  How do I write the serialization routines knowing that one member
> (the bit array) is indirectly expressed (i.e.
> translate to/from the text string)?  I guess I need separate save & load
> methods at least.
>
> --
> Daryle Walker
> Mac, Internet, and Video Game Junkie
> darylew AT hotmail DOT com
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
>
-- 
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