#zstd #zstandard #compression

sys zstd-sys

Low-level bindings for the zstd compression library

36 stable releases

new 2.0.6+zstd.1.5.2 Jan 31, 2023
2.0.4+zstd.1.5.2 Nov 28, 2022
2.0.1+zstd.1.5.2 Mar 15, 2022
1.6.4+zstd.1.5.2 Mar 9, 2022
1.1.5-a Mar 24, 2017

#30 in Compression

Download history 283460/week @ 2022-10-11 289336/week @ 2022-10-18 265666/week @ 2022-10-25 276220/week @ 2022-11-01 302453/week @ 2022-11-08 285952/week @ 2022-11-15 264110/week @ 2022-11-22 321978/week @ 2022-11-29 300641/week @ 2022-12-06 273507/week @ 2022-12-13 205176/week @ 2022-12-20 149360/week @ 2022-12-27 286616/week @ 2023-01-03 324127/week @ 2023-01-10 333038/week @ 2023-01-17 278065/week @ 2023-01-24

1,245,754 downloads per month
Used in 1,115 crates (10 directly)

MIT/Apache

2.5MB
44K SLoC

C 39K SLoC // 0.2% comments Rust 4.5K SLoC // 0.1% comments GNU Style Assembly 378 SLoC // 0.2% comments Shell 79 SLoC // 0.1% comments

zstd-sys

This is the low-level auto-generated binding to the zstd library. You probably don't want to use this library directly; instead, look at zstd-rs or zstd-safe.

Compile it yourself

zstd is included as a submodule. To get everything during your clone, use:

git clone https://github.com/gyscos/zstd-rs --recursive

Or, if you cloned it without the --recursive flag, call this from inside the repository:

git submodule update --init

Then, running cargo build in this directory should take care of building the C library and linking to it.

Build-time bindgen

This library includes a pre-generated bindings.rs file. You can also generate new bindings at build-time, using the bindgen feature:

cargo build --features bindgen

lib.rs:

Low-level bindings to the zstd library.

Dependencies