apple / apple/swift-nio-http2

Remove incremental header compression mode.

Open
#85 0 comments 0 reactions 0 assignees View on GitHub
⚠️ semver/major
Dominant language
Swift
Stars
503
Forks
103
Avg merge
18h 8m
Merged PRs (30d)
4

Description

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.

Contributor guide

Open the contributing guide

Research direction

Start by locating the HPACKEncoder implementation and its beginEncoding/endEncoding entry points, then inspect how NIOHTTP2 uses one-shot header compression. Confirm the v2 API and compatibility implications before removing the incremental mode; done means the one-shot path remains functional without the incremental-compression compromises.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
networking
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.