W3C home > Mailing lists > Public > ietf-http-wg@w3.org > October to December 2017

Re: HTTP2: Header Field Name.

From: Felix <37554884@qq.com>
Date: Tue, 10 Oct 2017 05:20:06 +0000
Cc: "ietf-http-wg" <ietf-http-wg@w3.org>
Message-Id: <tencent_B5ED6AD3BB59E880E6067646BA66A5134006@qq.com>
To: "Willy Tarreau" <w@1wt.eu>
> That's wrong, because in HTTP "Cool-Feature" is the same as "cool-feature"
> so you save one bit per character = 12 bits total by having the dash instead
> of upper cases, compared to the former where each character must have a bit
> to indicate the case. As long as you have on average less than one dash per
> 8 caracters, the dash wins. This counts when you start to use certain
> compression algorithms such as Huffman.

Why you need extra bit to indicate the case? They are ascii character, one octet each no matter lowercase or uppercase without Huffman Encoding.
Even by using Huffman Encoding.
CoolFeature is 64(7+5+5+6+7+5+5+5+6+6+5+2) bits including padding bits.
cool-feature is 72(5+5+5+6+6+6+5+5+5+6+6+5+7) bits including padding bits.
Still one byte less. Not to mention a character less to be decoded by endpoint to save some of CPU/Memory resources.
Received on Tuesday, 10 October 2017 12:56:40 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 November 2017 00:14:13 UTC