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 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: Geoff Bull Subject: Re: Decoding an octet stream Date: 1999/12/02 Message-ID: <38460ECE.27216603@research.canon.com.au>#1/1 X-Deja-AN: 555655987 Content-Transfer-Encoding: 7bit References: <877lj2q36g.fsf@deneb.cygnus.argh.org> <81u247$kc3$1@hobbes2.crc.com> <821rc5$bim$1@nnrp1.deja.com> <822o4d$ehh$1@birch.prod.itd.earthlink.net> <8233fm$ngf$1@nntp3.atl.mindspring.net> <87bt8a2uvr.fsf@deneb.cygnus.argh.org> To: Florian Weimer <" "@deneb.cygnus.argh.org> Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@research.canon.com.au X-Trace: cass.research.canon.com.au 944115111 18457 203.12.174.254 (2 Dec 1999 06:11:51 GMT) Organization: Canon Information Systems Research Australia Mime-Version: 1.0 NNTP-Posting-Date: 2 Dec 1999 06:11:51 GMT Newsgroups: comp.lang.ada Date: 1999-12-02T06:11:51+00:00 List-Id: Florian Weimer wrote: > > Perhaps I may ask again: Is it reasonable to assume that > Storage_Element'Size equals 8 (although the standard doesn't > require this, of course)? I would think this is the equivalent of assuming that a C char is 8 bits. Not strictly true, but a perfectly reasonable thing to do, so long as you are aware of the consequences. >And, looking at David's code, does > System.Default_Bit_Order really reflect the byte-ordering? Look in the reference manual! When the concept of byte order has any meaning, the answer is yes. 13.5.3 Bit Ordering (5) If Word_Size = Storage_Unit, the default bit ordering is implementation defined. If Word_Size > Storage_Unit, the default bit ordering is the same as the ordering of storage elements in a word, when interpreted as an integer