[Haskell-cafe] Data.Binary and little endian encoding

David Leimbach leimy2k at gmail.com
Thu May 14 23:46:10 EDT 2009


On Thu, May 14, 2009 at 8:40 PM, Don Stewart <dons at galois.com> wrote:

> leimy2k:
> > I actually need little endian encoding... wondering if anyone else hit
> this
> > with Data.Binary. (because I'm working with Bell Lab's 9P protocol which
> does
> > encode things on the network in little-endian order).
> >
> > Anyone got some "tricks" for this?
>
> Yes!
> There are big, little and host-endian primitives in the Get/Put monads.
>
>
> http://hackage.haskell.org/packages/archive/binary/0.5.0.1/doc/html/Data-Binary-Put.html#v%3AputWord16le
>
> You can use these to build encoders directly.


Cool... I just have to write my own encoder and decoder now.

As a request could we get encodeLe decodeLe for a later version of this
library?  :-)  That'd be totally awesome.


>
>
> Cheers,
>   Don
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090514/ff04e606/attachment.html


More information about the Haskell-Cafe mailing list