square/okhttp — pull request #812 by adriancole (2014-05-08 16:16:27+00:00)
Title: Remove FIXME from Huffman as it is good enough.

Using this PR to capture rationale.

Huffman header decoding involves the following operations.
* read a byte array of encoded data from the buffered source
* create a BAOS with default length of 32bytes.
* scan the input byte array and put each decoded byte into the BAOS
* copy the array from the BAOS into the byte string that represents a header name or value.

This process is used when we don't already have an hpack index of the name or value reference.

After looking into it, not only is the above implementation fast and not a limiting factor, it is also pretty byte efficient. Many header names and values are less than 32 bytes, so for example, the BAOS will not grow except during cases such as cookies. Guessing the decoded length to avoid growing is possible, but borders on (or is) over-optimization.

After some investigation, I think we should remove the FIXME on the BAOS as we've other fish to fry.