Skip to content

zstd compression: stop using the streaming feature #5111

Description

@daipom

Is your feature request related to a problem? Please describe.

The streaming feature (Zstd::StreamWriter and Zstd::StreamReader) of zstd-ruby is experimental.

Actually, there was a bug.
Although the critical bug has been resolved, some strange behavior is still being reported.

We considered that we may not need to use the streaming feature.

It would be better to stop using the streaming feature if it is unnecessary.

Describe the solution you'd like

#5094 (comment)

Describe alternatives you've considered

None.

Additional context

No response

Activity

  1. Watson1978 commented on Jun 28, 2026

    @Watson1978
    Contributor

    Note for when moving off the streaming feature:

    If the plan is to compress each segment with one-shot Zstd.compress and concatenate
    the results, note that the decompress side then has to handle concatenated zstd frames.
    On current zstd-ruby this matters:

    • Zstd.decompress (one-shot) returns only the first frame and silently drops the rest.
    • Zstd::StreamingDecompress#decompress decodes all frames correctly.

    There's an open PR to make the one-shot Zstd.decompress handle concatenated frames as well: SpringMT/zstd-ruby#139.
    Until that ships, the safe read path is StreamingDecompress#decompress.

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

    enhancementFeature request or improve operations

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions