Skip to content

Http3FrameDecoder

Defined in: packages/format-http/src/h3/http3-frame-codec.ts:85

Splits one HTTP/3 stream’s bytes (after its type, for a unidirectional one) into frames (RFC 9114 §7), in any chunking.

DATA payloads are not buffered: each chunk’s share comes out as a piece, a view into that chunk, valid only as long as the chunk is. Other frames are buffered whole, up to the configured limits. Unknown and grease frame types are skipped without buffering; a frame type that is reserved, or not allowed on this kind of stream, is a connection error. Field sections are left QPACK-encoded: decoding them depends on the connection’s QPACK state.

Decoding is O(n) in the bytes received.

new Http3FrameDecoder(options): Http3FrameDecoder

Defined in: packages/format-http/src/h3/http3-frame-codec.ts:96

Http3FrameDecoderOptions

Http3FrameDecoder

decode(chunk): Http3Frame[]

Defined in: packages/format-http/src/h3/http3-frame-codec.ts:105

Decode the frames chunk completes.

Uint8Array

Http3Frame[]

The frames, and the DATA pieces, in order.

When a frame is malformed, too large, or not allowed here.


end(): void

Defined in: packages/format-http/src/h3/http3-frame-codec.ts:139

The stream ended.

void

H3_FRAME_ERROR when it ended inside a frame.