#zstd #zstandard #compression

sys zstd-sys

Low-level bindings for the zstd compression library

26 stable releases

Uses old Rust 2015

1.5.0+zstd.1.4.9 Apr 1, 2021
1.4.20+zstd.1.4.9 Mar 3, 2021
1.4.19+zstd.1.4.8 Dec 20, 2020
1.4.17+zstd.1.4.5 Jun 14, 2020
1.1.5-a Mar 24, 2017

#85 in Compression

Download history 21612/week @ 2020-12-21 20964/week @ 2020-12-28 38413/week @ 2021-01-04 40714/week @ 2021-01-11 38411/week @ 2021-01-18 43704/week @ 2021-01-25 42743/week @ 2021-02-01 41655/week @ 2021-02-08 41665/week @ 2021-02-15 42769/week @ 2021-02-22 46238/week @ 2021-03-01 47065/week @ 2021-03-08 48701/week @ 2021-03-15 56718/week @ 2021-03-22 51580/week @ 2021-03-29 54536/week @ 2021-04-05

190,744 downloads per month
Used in 220 crates (4 directly)

MIT/Apache

4.5MB
93K SLoC

C 68K SLoC // 0.2% comments Rust 11K SLoC // 0.0% comments Visual Studio Project 6K SLoC Shell 2.5K SLoC // 0.2% comments Python 2.5K SLoC // 0.1% comments C++ 2K SLoC // 0.1% comments Visual Studio Solution 224 SLoC Batch 105 SLoC Lua 69 SLoC // 0.0% 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