[erlang-questions] sub-byte endianness in bit syntax

Tony Finch dot@REDACTED
Wed Aug 15 23:48:18 CEST 2007


I can't find anything in the documentation that describes the order in
which the bits of a byte are used up by a sequence of sub-byte segments in
the bit syntax. For big-endian data, like the standard IP header example,
it makes sense to fill in bytes most significant end first, whereas for
little endian data you should fill them least significant end first. These
conflict if you append big and little endian bit strings - which would be
mad, but I can't spot anything that says this causes an error.

Tony.
-- 
f.a.n.finch  <dot@REDACTED>  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 erlang-questions mailing list