[Haskell-cafe] Data.Binary and little endian encoding
David Leimbach
leimy2k at gmail.com
Thu May 14 23:57:37 EDT 2009
On Thu, May 14, 2009 at 8:54 PM, Don Stewart <dons at galois.com> wrote:
> > I'm speaking specifically of the encode/decode functions. I have no idea
> how
> > they're implemented.
> >
> > Are you saying that encode is doing something really simple and the
> default
> > encodings for things just happen to be big endian? If so, then I
> understand
> > the pain.... but it still means I have to roll my own :-) I guess if one
> must
> > choose, big endian kind of makes sense, except that the whole world is
> little
> > endian now, except for networks :-) (No one *really* cares about
> anything but
> > x86 anyway these days right?)
>
> Oh, 'encode' has type:
>
> encode :: Binary a => a -> ByteString
>
> it just encodes with the default instances, which are all network order:
>
> http://en.wikipedia.org/wiki/Endianness#Endianness_in_networking
>
Yeah I understand that Big Endian == Network Byte Order... which would be
true, if I wasn't talking about Plan 9's 9P protocol which specifies little
endian bytes on the wire (as far as I can tell anyway from the man page).
Dave
>
> -- Don
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090515/307595fb/attachment.html
More information about the Haskell-Cafe
mailing list