#zstd #zstandard #compression

sys zstd-sys

Low-level bindings for the zstd compression library

29 stable releases

1.6.2+zstd.1.5.1 Dec 23, 2021
1.6.1+zstd.1.5.0 Jun 9, 2021
1.6.0+zstd.1.5.0 May 14, 2021
1.4.20+zstd.1.4.9 Mar 3, 2021
1.1.5-a Mar 24, 2017

#25 in Compression

Download history 85945/week @ 2021-09-28 89927/week @ 2021-10-05 92544/week @ 2021-10-12 92714/week @ 2021-10-19 95279/week @ 2021-10-26 93242/week @ 2021-11-02 95514/week @ 2021-11-09 97612/week @ 2021-11-16 82434/week @ 2021-11-23 103160/week @ 2021-11-30 108588/week @ 2021-12-07 105639/week @ 2021-12-14 69602/week @ 2021-12-21 75443/week @ 2021-12-28 135453/week @ 2022-01-04 134204/week @ 2022-01-11

432,727 downloads per month
Used in 459 crates (4 directly)

MIT/Apache

2.5MB
47K SLoC

C 39K SLoC // 0.2% comments Rust 7.5K SLoC // 0.0% comments GNU Style Assembly 374 SLoC // 0.2% comments Shell 70 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