[Haskell-cafe] Re: [Haskell] ANNOUNCE: binary: high performance, pure binary serialisation

Donald Bruce Stewart dons at cse.unsw.edu.au
Thu Jan 25 22:16:22 EST 2007

> Yay! I knew if I waited long enough someone would write this.
> Is the binary format portable? I need the produced files to work on both
> 32 and 64 bit architectures and with big and little endian machines. And
> of course, between different versions of a compiler or different
> compilers.

We believe so, and its a bug if this is not the case.

The src documents the encoding format used for each type (we were unable
to attach haddocks to instances.. grr.)

All data is encoded in Network order, and extended to 64 bits for word
sized values (like Int). It should be possible to encode a structure
with ghc on x86, and decode it on a sparc64 running hugs.

-- Don

More information about the Haskell-Cafe mailing list