Re: HTTP2: Header Field Name.

> 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