Binary data in text-based protocol formats

At 04.18 +0100 99-02-20, Chris Newman wrote:
> I should also point out the option of a hybrid encoding.  Use a simple
> binary structure with fixed-length ASCII character strings for protocol
> keywords.  You get all the advantages of binary encoding, and a protocol
> dump is at least partially useful.  Secure Shell 2 has a different
> interesting hybrid characteristic -- it uses length-counted text strings
> for extensibility-oriented feature lists.

A nice idea. Is it common in standards?

Binary data in textual encodings seems to be a problem. How
is this usually handled? Base64 is of course an option.
MIME uses, if I understand it rightly, the convention that
<CRLF>--boundary text<CRLF> is end marker of a binary body
part. Not very neat.

I have looked at the XML specs, and not found any good way
of putting binary data into XML either. Have I missed
something?

To indicate the end of binary data with an octet-length
value before the binary data seems to me the neatest way,
but it seems not to be very popular in standards.

------------------------------------------------------------------------
Jacob Palme <jpalme@dsv.su.se> (Stockholm University and KTH)
for more info see URL: http://www.dsv.su.se/~jpalme

Received on Saturday, 20 February 1999 11:55:10 UTC