#zstd #zstandard

no-std zstd-safe

Safe low-level bindings for the zstd compression library

46 stable releases (5 major)

6.0.6 Jul 19, 2023
6.0.4+zstd.1.5.4 Feb 10, 2023
6.0.2+zstd.1.5.2 Nov 23, 2022
5.0.2+zstd.1.5.2 May 11, 2022
1.3.1 Jul 5, 2017

#25 in Compression

Download history 457809/week @ 2023-06-11 452412/week @ 2023-06-18 490455/week @ 2023-06-25 470423/week @ 2023-07-02 514100/week @ 2023-07-09 526113/week @ 2023-07-16 526403/week @ 2023-07-23 538009/week @ 2023-07-30 547246/week @ 2023-08-06 554542/week @ 2023-08-13 629752/week @ 2023-08-20 678869/week @ 2023-08-27 616921/week @ 2023-09-03 649575/week @ 2023-09-10 636106/week @ 2023-09-17 649543/week @ 2023-09-24

2,597,290 downloads per month
Used in 2,016 crates (14 directly)

MIT/Apache

2.5MB
46K SLoC

C 39K SLoC // 0.2% comments Rust 6.5K SLoC // 0.1% comments GNU Style Assembly 364 SLoC // 0.2% comments Shell 104 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 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