Boost logo

Boost Users :

From: Dan Leibovich (dan_at_[hidden])
Date: 2007-04-03 12:09:59


Dear Robert,

Have you made (or plan to make) any change in the library code following this thread.
I failed to find an update in the cvs tree.

Regards,
 Dan Leibovich

-----Original Message-----
From: boost-users-bounces_at_[hidden] [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Robert Ramey
Sent: å 16 îøõ 2007 22:49
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] [Serialization] issue withportable_binary_oarchive

Pfligersdorffer, Christian wrote:

> I read this thread with very much interest since I want to use the
> portable binary archive too. Could you please share your experience
> and especially the code of the version that actually works?

I've made some a few changes. I'll check them in to the HEAD before tomorrow.

a) I made a small change to binary_?archvive which was losing a "const" along the line and frustrating a template match

b) I made a change in portable_binary_?archive to fix an error whereby the sign bit was changed on certain negative numbers.

> Did you also add code to treat floating point types?

Nope - that's an excercise for the user.
Notes on the current implementation:

a) It presumes a two's complement computer so its not "truely" portable.
b) It doesn't include floating point. I think this would be more effort than first meets the eye. At least one attractive proposal on how to effectively do this was suggested.
c) Its not all that efficient on big endien machines. I think a better version would write the data out in native mode with flags in the header indicating how it was written. Then the endian fix up would occur when it was moved from one machine to another.
d) It focuses more on reducing archive size. So some a 64 bit value of 0 is written as one byte. This is probably a good choice for most. But it costs time in sign extending etc.

Robert Ramey

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


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