swift-nio-http2
swift-nio-http2 copied to clipboard
Remove incremental header compression mode.
When the HPACKEncoder
was first written it was written to provide incremental header compression. This was enhanced later on in the development of v1 to provide one-shot header compression, which is what NIOHTTP2
uses today.
The presence of the incremental compression mode with beginEncoding
/endEncoding
forces some awkward compromises in the one-shot compression mode, which means that beginEncoding
/endEncoding
are forced to do weird extra allocations for no particularly good reason. Of course, this doesn't matter really, because we don't use the functions anyway, but they're part of the public interface to NIOHPACK
and so cannot be changed right now.
In v2 we should just delete those functions. They're not useful, and cause more complexity than necessary.