swift-nio-http2 icon indicating copy to clipboard operation
swift-nio-http2 copied to clipboard

Remove incremental header compression mode.

Open Lukasa opened this issue 5 years ago • 0 comments

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.

Lukasa avatar Apr 05 '19 14:04 Lukasa