#zstd #api-bindings #zstandard

sys no-std zstd-sys

Low-level bindings for the zstd compression library

43 stable releases

2.0.13+zstd.1.5.6 Aug 2, 2024
2.0.12+zstd.1.5.6 Jul 5, 2024
2.0.11+zstd.1.5.6 Jun 17, 2024
2.0.10+zstd.1.5.6 Mar 27, 2024
1.1.5-a Mar 24, 2017

#317 in Compression

Download history 986788/week @ 2024-09-19 1018424/week @ 2024-09-26 1059039/week @ 2024-10-03 1029919/week @ 2024-10-10 1085797/week @ 2024-10-17 1087495/week @ 2024-10-24 1010660/week @ 2024-10-31 1057781/week @ 2024-11-07 1105361/week @ 2024-11-14 1017717/week @ 2024-11-21 934436/week @ 2024-11-28 1108317/week @ 2024-12-05 1085101/week @ 2024-12-12 696151/week @ 2024-12-19 491558/week @ 2024-12-26 758565/week @ 2025-01-02

3,249,545 downloads per month
Used in 3,675 crates (29 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