Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for the seekable format #310

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rorosen
Copy link

@rorosen rorosen commented Nov 25, 2024

This adds bindings for the seekable format to zstd-safe. Everything is behind the seekable feature flag, which disabled by default, and the basic functionality is covered by unit tests. In general, this is close to a 1-for-1 mapping to the seekable format C functions using rust types.

However, everything around the seek table API is commented out for now. I noticed that the creation of a seek table in ZSTD_seekTable_create_fromSeekable() (which is the only way to create a seek table) can cause a segmentation fault, if called with an uninitialized seekable. There is already a PR open upstream to fix the issue (facebook/zstd#4201). The complete seekable format can be used without access to the seek table functions without limitations, afaict they only provide advantages when working with multiple seekable archives in memory constrained environments.

This feature is also requested in #272

Support the seekable format through bindings to the upstream
functionality in zstd-safe. The seekable format can be activated with
the `seekable` feature flag.
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.

1 participant