Boost logo

Boost Users :

Subject: Re: [Boost-users] cross-platfrom binary serialization?
From: François Mauger (mauger_at_[hidden])
Date: 2008-09-27 16:59:36


Dear Nat and boosters

Ooops, rereading my message, I simply cannot figure out
the reason why I wrote such a stupid thing!
You are absolutely right and your calculation of this factor ~<2
rather than 6 is ok.
So this hypothetical system is still bad, but not as bad as I claimed
before. Thank you for the fix.
And sorry for the trouble ("Au temps pour moi!").

regards

frc

--
> I do understand that this issue has already been debated to the point of
> a new implementation. I just want to ask about a side point I didn't
> quite understand earlier.
>
> François Mauger wrote:
>
>>> In fact, since we are only rendering the
>>> characters "[-+e.0-9]" we could use a modified BCD or other compressed
>>> format to provide the compression that is typically what people assume
>>> in binary formats.
>>
>> ok this is only a set of 14 glyphs so it could be hosted via short ints
>> (with 2 bits unused)
>
> ? I think each of 14 glyphs could be represented in 4 bits, with 2 bit
> patterns left over.
>
>> consider a typical float (relative precision ~1e-7).
>> If one need to store pi as +0.3141592e+01 (ASCII) it is 14 characters
>> (only 11 is one saves leading'+' and exponent '+0' chars for >0 mantissa
>> and exponent)
>> that could be serialized using 14/11 shorts, so this is 28/22 bytes.
>> This has to be compared with 4 bytes for floats!
>
> It seems to me that 14 characters in the constrained glyph set could be
> represented with 14 4-bit "nybbles," or 7 bytes.
>
> It's still worse than 4 bytes, but by a factor < 2 rather than ~6.
>
> Please forgive me if I've misunderstood you.
> _______________________________________________
> 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