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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d778a4f52acd9d43 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.73.229 with SMTP id o5mr24444406pbv.7.1325153460415; Thu, 29 Dec 2011 02:11:00 -0800 (PST) Path: lh20ni76989pbb.0!nntp.google.com!news2.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Representation clauses for base-64 encoding Date: Thu, 29 Dec 2011 11:10:50 +0100 Organization: cbb software GmbH Message-ID: References: <4ef31672$0$6574$9b4e6d93@newsspool3.arcor-online.net> <9lgls6FticU1@mid.individual.net> <9m0433FjokU1@mid.individual.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: PPt+vSuBRqtkVsMLa1J3Dg.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2011-12-29T11:10:50+01:00 List-Id: On Wed, 28 Dec 2011 23:41:57 -0600, Randy Brukardt wrote: > "Niklas Holsti" wrote in message > news:9m0433FjokU1@mid.individual.net... >> True for internal data, false for inputs and outputs. > > Not really. The vast majority of inputs and outputs are in text form (as in > the encoding example). Most of the rest are just a pure stream of bytes. And > the interesting thing with a stream of bytes is that you get identical > behavior for both bit orders -- because the bit order and byte order are > tied together. The problem comes when you try to use the non-native bit and > byte order on a machine. No. It is true that bit order within the octets is properly handled by the hardware, wrong is that you could ignore it once you got the octets read. Many octet-based protocols use bit fields spanning across several octets starting and ending anywhere in the octet. Probably you could ignore this reordering octets of the stream into the machine-native order. If you knew how to, because of nice middle-endian representations. Formally speaking a stream cannot be reordered at all, because it is unbounded. You could reorder only octets of a packet, a word etc. But not before calculating the check sums. The real-life protocols are difficult to crack. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de