|
|
Am 09.03.2011 12:05, schrieb Invisible:
> Not sure what happens if you need to write bytes backwards, as some
> broken protocols and file formats require. Is there a directive for
> that? Or do you have to do it by hand?
What you call "broken" is just a different convention: There is no such
thing as a "natural" byte order, unless you're really digging as deep as
the baseband level - where it again breaks down to a convention issue,
because it depends on whether multi-bit values are sent MSBit first or
LSBit first.
Fun fact: The famous MSByte-first "network byte order" used in the
TCP/IP protocol family does /not/ match the bit ordering of the famous
Ethernet, which is LSBit-first. So if there is such a thing as a broken
protocol with regard to bit/byte ordering, TCP/IP-over-Ethernet is one
of them.
(That said, I guess a language that is deeply rooted in the world of
network protocols will have plenty of ways to deal with byte & bit
ordering.)
Post a reply to this message
|
|