#zstd #zstandard #compression

zstd-safe

Safe low-level bindings for the zstd compression library

32 stable releases (3 major)

4.1.1+zstd.1.5.0 Jun 9, 2021
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
1.3.1 Jul 5, 2017

#22 in Compression

Download history 54210/week @ 2021-04-07 54616/week @ 2021-04-14 51737/week @ 2021-04-21 54888/week @ 2021-04-28 53517/week @ 2021-05-05 53759/week @ 2021-05-12 50275/week @ 2021-05-19 49010/week @ 2021-05-26 56355/week @ 2021-06-02 56688/week @ 2021-06-09 58194/week @ 2021-06-16 62703/week @ 2021-06-23 62566/week @ 2021-06-30 65258/week @ 2021-07-07 69705/week @ 2021-07-14 66861/week @ 2021-07-21

222,835 downloads per month
Used in 257 crates (6 directly)

MIT/Apache

2.5MB
49K SLoC

C 38K SLoC // 0.2% comments Rust 11K SLoC // 0.0% comments Shell 69 SLoC // 0.1% 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