Boost logo

Boost Users :

From: Robert Mecklenburg (rmecklenburg_at_[hidden])
Date: 2008-08-25 12:40:43


Robert Ramey writes:
> This should make it apparent why I've never wanted to make a
> "portable binary archive" but left it as a demo or example.

I'm sure many will think this is a totally stupid suggestion, but I
can't resist making a fool of myself. ;-)

Since floats are the problem with portable binary archives, why not
punt on this issue and render floating point types (only) in ascii.

For many uses floating point is not the critical path and binary
archives solve many problems other than floating point: endian-ness,
native integer size differences, etc. And those issues can be quite
difficult to deal with otherwise.

This can be viewed as a special case of a standard technique: for
highly non-standard data using an independent format that translates
easily into each proprietary format. In this case the independent
format is simply ascii. 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.

Thoughts?

-- 
Robert

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