-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 29 August 2008 01:42 am, Rainer Deyke wrote:
Johan RĂ¥de wrote:
I see three options for dealing with the endianness issue: 1. make all archives big-endian 2. make all archives little-endian 3. use the native format when saving, and put an endianness flag in the archive.
1 is inefficient when moving data between little-endian platforms 2 is inefficient when moving data between big-endian platforms So 3 should be most efficient. Is there an easy way of storing an endianness-flag in an archive?
I don't think performance should be the overriding concern, especially since byte-shuffling is very fast. The problem with option 3 is that it introduces a potential source of bugs that only manifests when moving between platforms with different endianness. I'd prefer option 1, precisely because it requires shuffling on the most common platforms so any bugs in the shuffling code are sure to be caught early.
Why are you guys not just using XDR for your portable binary format? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIuDko5vihyNWuA4URAi6qAKCkfVFj3NsWuLhOMJQR8/K6PaoDAQCfUipv CTwrCNBunviV+roNw2yTRX0= =wQzm -----END PGP SIGNATURE-----