Open JunTaoLuo opened 6 years ago
Might be able to leverage the code at: https://github.com/aspnet/KestrelHttpServer/blob/423d5432be5206849cd90cc0f524aed0ec8d028b/src/Kestrel.Core/Internal/Http2/HPack/Huffman.cs.
See https://github.com/dotnet/corefx/pull/41805 where I updated our shared HPackEncoder
to support this.
I prototyped it a few different ways and found that even with lots of optimization, the CPU usage introduced by Huffman coding was unacceptable.
@JamesNK did we do this?
No.
I don't think huffman encoding is very valuable. We'd only use it with large header values and only if not already compressed with HPack.
Should we close then?
Currently we are using a direct encoding when we encode headers. We can optimize by using Huffman code: https://tools.ietf.org/html/rfc7541#section-2.4.
Related work: