Skip to content

Incremental streaming API (feed/drain, both directions) #2

Description

@jamesarich

kzstd is deliberately one-shot today — each call handles a whole frame from one byte array, with no cross-call state (fully RFC 8878-conformant). A streaming API would let consumers compress/decompress large data incrementally without holding it all in memory.

Scope

A stateful encoder + decoder that accept input in chunks and emit/consume bytes incrementally, maintaining a sliding window (windowSize) of history for back-references. This is a larger feature — state machines for both directions plus a dedicated test matrix — and it is additive: it can be added without breaking the existing one-shot Zstd surface.

Pairs naturally with multi-block encoding (the single-block cap issue).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions