Re: UTF-8 or ASCII Header Names?

On 16 August 2013 08:44, Roberto Peon <grmocg@gmail.com> wrote:
> The keys should be ASCII, and the values bytes.

That's a fairly narrow view.  If the values were (for example) ASCII,
then you'd have an opportunity to compress better.  At worst, you can
wipe the high order bit from every octet.

At some level you are going to need to either make assumptions about
the properties of values, or rely on specific knowledge about them if
you are going to compress effectively.  Even if it were the case that
the bytes were UTF-8, you could still make some gains over pure bytes
(even just by exploiting the fact that certain byte sequences are not
possible in UTF-8).

Received on Friday, 16 August 2013 16:19:27 UTC