[Haskell-cafe] Parsing binary data.
dot at dotat.at
Wed Aug 22 11:54:59 EDT 2007
On Wed, 22 Aug 2007, Lutz Donnerhacke wrote:
> * Tony Finch wrote:
> > http://erlang.org/doc/programming_examples/bit_syntax.html#4
> > The IP header example in the latter is a brilliant real-world example.
> Unfortunly this example does not handle bit and byte order.
> Take a look at Ada's representation clauses for such topics.
Erlang has support for byte endianness but not (it seems) bit endianness.
I'm currently kicking up a fuss about this on the erlang-questions list,
since while Erlang's bitwise big-endian layout works OK for network
protocols, it fails for typical little-endian C structures with bit
Thanks for the pointer to Ada.
f.a.n.finch <dot at dotat.at> http://dotat.at/
IRISH SEA: SOUTHERLY, BACKING NORTHEASTERLY FOR A TIME, 3 OR 4. SLIGHT OR
MODERATE. SHOWERS. MODERATE OR GOOD, OCCASIONALLY POOR.
More information about the Haskell-Cafe