Skip to content

Framework-agnostic model layer for Compression Dictionary Transport headers #92

Description

@dfa1

Builds on #91 (which covers only the dcz frame codec).

Idea

A pure "model" layer for RFC 9842's HTTP semantics — builder-style objects that produce/parse the values of the three headers, with zero dependency on any HTTP framework (no Servlet, Spring, Quarkus, Micronaut, Netty types). Framework integrations would be thin adapters on top: read the raw header string in, hand it to this model, get a value object back (or the reverse for building outgoing header values).

Scope:

  • Use-As-Dictionary — parse/build the response header value (match patterns, options).
  • Available-Dictionary — parse/build the request header value (dictionary hash).
  • Dictionary-ID — parse/build the echoed identifier.
  • URL pattern matching against WHATWG URL Pattern to decide dictionary applicability.
  • Header values follow RFC 8941 Structured Field Values grammar — needs a small SFV parser/serializer.

Explicitly still out of scope: actual dictionary storage/cache lifecycle, cross-origin/CORS enforcement, HTTPS-only checks, and any framework wiring itself.

Why separate from #91

This is a meaningfully bigger surface than the dcz codec (SFV parsing + URL Pattern matching are their own subspecs), and it's a different kind of concern — no relation to the native zstd bindings. Likely belongs in its own module/artifact so the core zstd module stays dependency-free and scoped to FFM bindings.

Open questions

  • Separate Maven module (e.g. dictionary-transport) vs. new artifact entirely outside this repo?
  • Roll our own minimal SFV/URL-Pattern parsers, or is there a small dependency-free Java implementation worth vendoring?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions