#zstd #zstandard #compression

zstd-safe

Safe low-level bindings for the zstd compression library

34 stable releases (3 major)

4.1.3+zstd.1.5.1 Jan 6, 2022
4.1.2+zstd.1.5.1 Dec 23, 2021
4.1.1+zstd.1.5.0 Jun 9, 2021
3.1.0+zstd.1.4.9 Apr 1, 2021
1.3.1 Jul 5, 2017

#70 in Compression

Download history 85318/week @ 2021-09-28 89334/week @ 2021-10-05 91932/week @ 2021-10-12 91172/week @ 2021-10-19 93763/week @ 2021-10-26 91431/week @ 2021-11-02 93567/week @ 2021-11-09 96075/week @ 2021-11-16 81172/week @ 2021-11-23 100666/week @ 2021-11-30 106023/week @ 2021-12-07 103042/week @ 2021-12-14 66725/week @ 2021-12-21 73830/week @ 2021-12-28 147258/week @ 2022-01-04 144062/week @ 2022-01-11

449,326 downloads per month
Used in 452 crates (7 directly)

MIT/Apache

2.5MB
48K SLoC

C 39K SLoC // 0.2% comments Rust 9K SLoC // 0.0% comments GNU Style Assembly 372 SLoC // 0.2% comments Shell 96 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