[Top] [All Lists]

Re: [ietf-smtp] quoted-unprintable ?

2021-03-25 17:46:12
On Thu, 25 Mar 2021, Tony Finch wrote:
> Stuart Cheshire and Mary Baker have a super elegant binary escaping scheme
> called "consistent overhead byte stuffing" (COBS) that has a guaranteed
> overhead of less than 1%.

That's quite clever, although it only avoids a single value and it's not
immediately obvious how to extend it to multiple values.  Applying it
iteratively for different values wouldn't work.

If you really think this is a problem worth solving, the simplest way to do it is encrypt the dats using a fast encryption scheme and a fixed key. Encryption pretty much guarantees that there won't be too many of any particular byte

Look at the paper, which is solving a different problem. He's dealing with a situation where there is one special byte (zero in his example) which is used to frame blocks, and this twiddles the data in a way that gets rid of zeros very cheaply.

Our problem is different. There's at least one value we need to avoid (zero), and two that we need to quote when they're in the data, and ignore otherwise (CR and LF). COBS doesn't help either with quoting CR and LF when they are significant or ignoring them when they are not.

John Levine, johnl(_at_)taugh(_dot_)com, Taughannock Networks, Trumansburg NY
Please consider the environment before reading this e-mail.

ietf-smtp mailing list