zerodds-hpack
Layer 5 — Bridges. HPACK (RFC 7541) header-compression codec for HTTP/2.
- Source: crates/hpack
- API docs: docs.rs/zerodds-hpack
zerodds-hpack delivers the complete HPACK wire layer: variable-
length integer (§5.1), string literals with optional static
Huffman code from Appendix B (§5.2), the static table with all 61
Appendix A entries, the dynamic table with spec-§4 eviction semantics,
and all four §6 header-field representations (indexed, literal-
with-indexing, literal-without-indexing, literal-never-indexed).
no_std + alloc, forbid(unsafe_code).
Spec anchors
- RFC 7541 §2.3, §4, §5.1, §5.2, §6.1, §6.2.1, §6.2.2, §6.2.3, §6.3, Appendix A (static table), Appendix B (Huffman).
Layer position
Layer 5 — Bridges. Substrate for
zerodds-http2 (HEADERS/CONTINUATION frame bodies)
and zerodds-grpc-bridge (gRPC-over-HTTP/2 +
gRPC-Web).
Quickstart
use zerodds_hpack::{Decoder, Encoder, HeaderField};
let mut encoder = Encoder::new();
let mut decoder = Decoder::new();
let headers = vec![
HeaderField { name: ":method".into(), value: "GET".into() },
HeaderField { name: ":scheme".into(), value: "https".into() },
HeaderField { name: "custom-key".into(), value: "custom-value".into() },
];
let wire = encoder.encode(&headers);
let decoded = decoder.decode(&wire).expect("roundtrip");
assert_eq!(decoded, headers);
Feature flags
| Feature | Default | Purpose |
|---|---|---|
std |
✅ | std::error::Error for all error types. |
alloc |
✅ (via std) | Vec / String / VecDeque. |
no_std-capable: default-features = false, features = ["alloc"].
Stability
1.0.0-rc.3. Public API, wire format (RFC 7541) and error
discriminants are RC1-stable; breaking changes require a major
bump.
zerodds-hpack
Layer 5 — Bridges. HPACK (RFC 7541) Header-Compression-Codec fuer HTTP/2.
- Quelle: crates/hpack
- API-Docs: docs.rs/zerodds-hpack
zerodds-hpack liefert die komplette HPACK-Wire-Schicht: Variable-
Length-Integer (§5.1), String-Literals mit optionalem statischem
Huffman-Code aus Appendix B (§5.2), Static-Table mit allen 61
Appendix-A-Eintraegen, Dynamic-Table mit Spec-§4-Eviction-Semantik
und alle vier §6-Header-Field-Repraesentationen (Indexed, Literal-
with-Indexing, Literal-without-Indexing, Literal-Never-Indexed).
no_std + alloc, forbid(unsafe_code).
Spec-Anker
- RFC 7541 §2.3, §4, §5.1, §5.2, §6.1, §6.2.1, §6.2.2, §6.2.3, §6.3, Appendix A (Static-Table), Appendix B (Huffman).
Schichten-Position
Layer 5 — Bridges. Substrat fuer
zerodds-http2 (HEADERS-/CONTINUATION-Frame-Bodies)
und zerodds-grpc-bridge (gRPC-over-HTTP/2 +
gRPC-Web).
Quickstart
use zerodds_hpack::{Decoder, Encoder, HeaderField};
let mut encoder = Encoder::new();
let mut decoder = Decoder::new();
let headers = vec![
HeaderField { name: ":method".into(), value: "GET".into() },
HeaderField { name: ":scheme".into(), value: "https".into() },
HeaderField { name: "custom-key".into(), value: "custom-value".into() },
];
let wire = encoder.encode(&headers);
let decoded = decoder.decode(&wire).expect("roundtrip");
assert_eq!(decoded, headers);
Feature-Flags
| Feature | Default | Zweck |
|---|---|---|
std |
✅ | std::error::Error fuer alle Fehler-Typen. |
alloc |
✅ (via std) | Vec / String / VecDeque. |
no_std-fahig: default-features = false, features = ["alloc"].
Stabilitaet
1.0.0-rc.3. Public-API, Wire-Format (RFC 7541) und Fehler-
Diskriminanten sind RC1-stabil; Breaking-Changes erfordern Major-
Bump.