-
Notifications
You must be signed in to change notification settings - Fork 116
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for the work here!
Left a couple of comments, but overall it looks very nice, and I'm looking forward to merging it.
EDIT: It seems facebook/zstd#4201 was merged back in November, but we're still waiting for a release (1.5.7?) to include it.
9015062
to
40111e3
Compare
Thanks for your review! I updated the PR according to your suggestions, let me know if there is anything else. I also think the |
Support the seekable format through bindings to the upstream functionality in zstd-safe. The seekable format can be activated with the `seekable` feature flag.
40111e3
to
ab2ae11
Compare
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