From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a883dc07df0d6bb1 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Decoding an octet stream Date: 1999/12/03 Message-ID: <828mh3$86j$1@nnrp1.deja.com>#1/1 X-Deja-AN: 555992224 References: <877lj2q36g.fsf@deneb.cygnus.argh.org> <81u247$kc3$1@hobbes2.crc.com> <87puwsmizb.fsf@deneb.cygnus.argh.org> X-Http-Proxy: 1.0 x22.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Fri Dec 03 15:10:30 1999 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-12-03T00:00:00+00:00 List-Id: In article <87puwsmizb.fsf@deneb.cygnus.argh.org>, " "@deneb.cygnus.argh.org (Florian Weimer) wrote: > "David C. Hoos, Sr." writes: > > > if System.Default_Bit_Order = System.Low_Order_First then > > Swap (The_Bytes); > > end if; > > Does this really work? I thought that System.Default_Bit_Order > hasn't got to do anything with octet ordering issues (aka endianess). > After all, there are more than just two methods of combining four octets > to a 32 bit integer (for example). Well yes, but as we all know there are only two methods worth bothering about. And in practice bit ordering and byte ordering have to be the same, otherwise you get non-contiguous data fields (this is why changing the default on bit_order, which does NOT result in changing the byte order, is highly dubious on a byte addressed machine, and hence not required to be implemented). In the latest version of GNAT we allow the non-default bit order to be specified, but we insist that all record representation clauses for such a record either lie within a single byte, or correspond to an integral number of bytes (in the latter case we warn that the byte order will NOT be modified). > Sent via Deja.com http://www.deja.com/ Before you buy.