#safe-bindings #zstd #zstandard #api-bindings

no-std zstd-safe

Safe low-level bindings for the zstd compression library

50 stable releases (6 major)

7.2.1 Aug 2, 2024
7.2.0 Jul 5, 2024
7.1.0 Mar 27, 2024
7.0.0 Oct 11, 2023
1.3.1 Jul 5, 2017

#110 in Compression

Download history 1113180/week @ 2024-07-17 1148541/week @ 2024-07-24 1145842/week @ 2024-07-31 1202007/week @ 2024-08-07 1185554/week @ 2024-08-14 1262635/week @ 2024-08-21 1197359/week @ 2024-08-28 1303965/week @ 2024-09-04 1207343/week @ 2024-09-11 1164555/week @ 2024-09-18 1215908/week @ 2024-09-25 1258398/week @ 2024-10-02 1235857/week @ 2024-10-09 1305835/week @ 2024-10-16 1288868/week @ 2024-10-23 1222630/week @ 2024-10-30

5,293,745 downloads per month
Used in 3,373 crates (22 directly)

MIT/Apache

2.5MB
45K SLoC

C 39K SLoC // 0.2% comments Rust 6K SLoC // 0.1% comments GNU Style Assembly 372 SLoC // 0.2% 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 mentioned 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