Visitar URL original
feat: add FFI bindings for zstd's advanced API by jkachmar · Pull Request #11 · luispedro/hs-zstd · GitHub
Skip to content

feat: add FFI bindings for zstd's advanced API - #11

Open
jkachmar wants to merge 1 commit into
luispedro:masterfrom
jkachmar:advanced-ffi
Open

jkachmar wants to merge 1 commit into
luispedro:masterfrom
jkachmar:advanced-ffi

Conversation

@jkachmar

@jkachmar jkachmar commented May 1, 2026

Copy link
Copy Markdown

description

doesn't (yet) bind against the full advanced API, just enough to support parallel compression.

doesn't (yet) bind against the full advanced API, just enough to support
parallel compression.
Comment on lines +37 to +46
, zstd_c_compressionLevel
, zstd_c_nbWorkers
, zstd_c_jobSize
, zstd_c_overlapLog
, zstd_e_continue
, zstd_e_flush
, zstd_e_end
, zstd_reset_session_only
, zstd_reset_parameters
, zstd_reset_session_and_parameters

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i pretty much reflected the libzstd names as-is; i wasn't really sure if there was a better approach as compared to just exposing them all from this module

Comment on lines +148 to +164
-- | @ZSTD_c_overlapLog@ compression parameter, sets the overlap of consecutive
-- jobs in multi-threaded mode, as a fraction of window size; larger values
-- increase compression ratio, but decrease speed.
--
-- Range @0..9@:
--
-- * @0@ = library default, varies between 6 and 9 depending on compression strategy
-- * @1@ = no overlap
-- * @9@ = full window
--
-- Each intermediate rank halves the previous overlap:
--
-- * @9@: @w@
-- * @8@: @w\/2@
-- * @7@: @w\/4@
--
-- ...and so on until @1@ (none).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think the Python library's overlap_log documentation is a little better than what i wrote here

@jkachmar jkachmar mentioned this pull request May 1, 2026
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