Skip to content

Conversation

cosmo0920
Copy link
Contributor

By default, this gem is unintentionally having a 128kb cliff to compress with zstd compression.
This is not good for large amount of data handling software like Fluentd.
Between Fluentd and Fluent Bit, we're heavily relying on zstd frames that is marked as magic byte for zstd specification.
Currently, this magic bytes is broken when exceeding 128 KB cliff (2^17).
This condition is easily exceeding. Because when ingesting about 5000 lines or more which is 128kb or more size of data.

Closes #112

Signed-off-by: Hiroshi Hatake <cosmo0920.oucc@gmail.com>
Signed-off-by: Hiroshi Hatake <cosmo0920.oucc@gmail.com>
@SpringMT
Copy link
Owner

Huge thanks for fixing this critical bug 🙇

@SpringMT SpringMT merged commit 7dd75ca into SpringMT:main Sep 26, 2025
6 checks passed
SpringMT added a commit that referenced this pull request Sep 26, 2025
…128kb-or-more-data

Add pending handler to concat 128kb or more data
SpringMT added a commit that referenced this pull request Sep 26, 2025
Merge pull request #114 from cosmo0920/add-pending-handler-to-concat-…
@SpringMT
Copy link
Owner

I just released https://rubygems.org/gems/zstd-ruby/versions/1.5.7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Streaming compression and decompression corruption
2 participants