comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Representation clauses for base-64 encoding
Date: Thu, 29 Dec 2011 11:10:50 +0100
Date: 2011-12-29T11:10:50+01:00	[thread overview]
Message-ID: <y7iwkm4e4665.1hnvsf7jt7dkq$.dlg@40tude.net> (raw)
In-Reply-To: jdguj9$2fl$1@munin.nbi.dk

On Wed, 28 Dec 2011 23:41:57 -0600, Randy Brukardt wrote:

> "Niklas Holsti" <niklas.holsti@tidorum.invalid> 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



  reply	other threads:[~2011-12-29 10:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-22  9:41 Representation clauses for base-64 encoding Natasha Kerensikova
2011-12-22 11:20 ` Niklas Holsti
2011-12-23  1:30   ` Randy Brukardt
2011-12-26  8:33     ` Niklas Holsti
2011-12-28  0:09       ` Randy Brukardt
2011-12-22 11:37 ` Georg Bauhaus
2011-12-22 12:24   ` Niklas Holsti
2011-12-22 15:09     ` Georg Bauhaus
2011-12-22 16:00       ` Natasha Kerensikova
2011-12-22 22:18         ` Georg Bauhaus
2011-12-25 10:17           ` Niklas Holsti
2011-12-27 11:23             ` Georg Bauhaus
2011-12-27 19:37               ` Niklas Holsti
2011-12-27 20:49                 ` Robert A Duff
2011-12-27 23:47                   ` Niklas Holsti
2011-12-29  0:50                     ` Robert A Duff
2011-12-30 20:54                       ` anon
2011-12-30 20:56                       ` Niklas Holsti
2011-12-23  1:42     ` Randy Brukardt
2011-12-28  8:59       ` Niklas Holsti
2011-12-29  5:41         ` Randy Brukardt
2011-12-29 10:10           ` Dmitry A. Kazakov [this message]
2011-12-23  1:33 ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox