square/okhttp — pull request #452 by adriancole (2014-01-17 06:31:39+00:00)
Title: Support more than 64 referenced headers in HPACK

I initially wanted to implement > 64 referenced headers with a BitSet, but the lack of a left shift op means we would have to write it, and that probably means copying the BitSet. I chose BigInteger instead as it allows us to support larger header sets without much impact to the codebase.

Efficiency:
For requests or responses with <64 headers, the performance is the same as before. For large header sets (>=64 entries), there are more allocations, as set bit or shift operations work against the immutable BigInteger type. Since http messages rarely employ 64 or more headers, the efficiency concern is edge case.