Skip to main content
Crisp Byte

Improvements

Format #

  1. QPACK might be better than HPACK, but I can't find a .NET implementation of QPACK.
  2. Both QPACK and HPACK use a static table designed for compressing the most common headers on the web. A different static table designed for SDBD could compress things better.
  3. For better interaction with streams, I want to change the metadata length value from number of bytes to number of headers. We know how many headers there are before we start encoding them. We don't know how many bytes the result will be until encoding is done.
  4. Also 64KB of header data is possible, but having over 64K headers shouldn't happen. Even 256 headers seems absurd, so maybe number of headers could be shrunk to one byte.

Demo Implementation #

  1. The proof of concept could use tests, error handling, data validation, and a fix for the warnings. At the least, validate the content-name so nobody can do anything hacky with it.
  2. It shouldn't be hard to add content-type to the demo output.
  3. I think a reference API built around streams instead of byte arrays would feel nicer.
  4. Wrangling the hpack NuGet package to work around streams might take some effort.
  5. Also a spec-compliant version of Document. Dictionary<string, string> breaks all three rules for headers listed back in Semantics.