Re: [Boost-users] [Serialization] issue withportable_binary_oarchive
Dear Robert,
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org]On Behalf Of Robert Ramey Sent: Friday, March 16, 2007 9:49 PM To: boost-users@lists.boost.org 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.
I will have a look at that.
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.
OK, I would not use it on some very fancy cpus then. ppc and x86 should probably work and that's what counts with me.
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.
I would like to switch to big endian representation to ensure maximum speed on the embedded system. This should easily be possible by changing the #ifdef BOOST_LITTLE_ENDIAN sections into #ifndef, or? ...
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
By the way: did you solve the destruction issue when deleting an archive through the polymorphic interface? I sent you an email about that (a couple of months ago) and you answered you'd have a look at it. Regards, -- DI Christian Pfligersdorffer Software Engineering EOS GmbH
Pfligersdorffer, Christian wrote:
By the way: did you solve the destruction issue when deleting an archive through the polymorphic interface? I sent you an email about that (a couple of months ago) and you answered you'd have a look at it.
I looked in my pending issue file and don't see anything with your name on it so either I fixed it or I forgot to save it. Send it to me again. Robert Ramey
Regards,
participants (2)
-
Pfligersdorffer, Christian
-
Robert Ramey