53 stable releases (6 major)

new 7.2.4 Mar 20, 2025
7.2.1 Aug 2, 2024
7.2.0 Jul 5, 2024
7.1.0 Mar 27, 2024
1.3.1 Jul 5, 2017

#186 in Compression

Download history 1302306/week @ 2024-12-02 1595748/week @ 2024-12-09 1227837/week @ 2024-12-16 590318/week @ 2024-12-23 722172/week @ 2024-12-30 1326634/week @ 2025-01-06 1421861/week @ 2025-01-13 1281430/week @ 2025-01-20 1346135/week @ 2025-01-27 1506137/week @ 2025-02-03 1778463/week @ 2025-02-10 1727397/week @ 2025-02-17 2033372/week @ 2025-02-24 2052837/week @ 2025-03-03 2094620/week @ 2025-03-10 1937680/week @ 2025-03-17

8,213,749 downloads per month
Used in 4,001 crates (23 directly)

MIT/Apache

2.5MB
47K SLoC

C 40K SLoC // 0.2% comments Rust 7K SLoC // 0.1% comments GNU Style Assembly 379 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