#zstd #zstandard

sys no-std zstd-sys

Low-level bindings for the zstd compression library

41 stable releases

new 2.0.11+zstd.1.5.6 Jun 17, 2024
2.0.10+zstd.1.5.6 Mar 27, 2024
2.0.9+zstd.1.5.5 Oct 11, 2023
2.0.8+zstd.1.5.5 Apr 5, 2023
1.1.5-a Mar 24, 2017

#235 in Compression

Download history 719499/week @ 2024-03-02 717519/week @ 2024-03-09 716397/week @ 2024-03-16 734180/week @ 2024-03-23 795773/week @ 2024-03-30 783028/week @ 2024-04-06 779941/week @ 2024-04-13 804831/week @ 2024-04-20 772830/week @ 2024-04-27 805813/week @ 2024-05-04 826328/week @ 2024-05-11 815895/week @ 2024-05-18 798762/week @ 2024-05-25 943741/week @ 2024-06-01 932173/week @ 2024-06-08 783889/week @ 2024-06-15

3,599,320 downloads per month
Used in 2,853 crates (24 directly)

MIT/Apache

2.5MB
45K SLoC

C 40K SLoC // 0.2% comments Rust 4.5K SLoC // 0.1% comments GNU Style Assembly 382 SLoC // 0.2% 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