#zstd #zstandard #compression

zstd-safe

Safe low-level bindings for the zstd compression library

29 stable releases

Uses old Rust 2015

3.1.0+zstd.1.4.9 Apr 1, 2021
3.0.1+zstd.1.4.9 Mar 3, 2021
3.0.0+zstd.1.4.8 Dec 20, 2020
2.0.6+zstd.1.4.7 Dec 17, 2020
1.3.1 Jul 5, 2017

#21 in Compression

Download history 22499/week @ 2020-12-29 37247/week @ 2021-01-05 38449/week @ 2021-01-12 38304/week @ 2021-01-19 42704/week @ 2021-01-26 39839/week @ 2021-02-02 39669/week @ 2021-02-09 40777/week @ 2021-02-16 40826/week @ 2021-02-23 43569/week @ 2021-03-02 46552/week @ 2021-03-09 48651/week @ 2021-03-16 55693/week @ 2021-03-23 48940/week @ 2021-03-30 54966/week @ 2021-04-06 54589/week @ 2021-04-13

183,916 downloads per month
Used in 214 crates (6 directly)

MIT/Apache

4.5MB
94K SLoC

C 68K SLoC // 0.2% comments Rust 12K 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 223 SLoC Batch 104 SLoC Lua 68 SLoC // 0.0% comments

zstd-safe

This is a thin, no-std, safe abstraction built on top of the bindings from [zstd-sys].

It is close to a 1-for-1 mapping to the C functions, but uses rust types like slices instead of pointers and lengths.

For a more comfortable higher-level library (with Read/Write implementations), see zstd-rs.


lib.rs:

Minimal safe wrapper around zstd-sys.

This crates provides a minimal translation of the zstd-sys methods. For a more comfortable high-level library, see the zstd crate.

Most of the functions here map 1-for-1 to a function from the C zstd library mentionned in their descriptions. Check the source documentation for more information on their behaviour.

Features denoted as experimental in the C library are hidden behind an experimental feature.

Dependencies