#zstd #zstandard #compression

zstd-safe

Safe low-level bindings for the zstd compression library

24 stable releases

2.0.4+zstd.1.4.5 May 24, 2020
2.0.3+zstd.1.4.4 Nov 5, 2019
2.0.0+zstd.1.4.3 Oct 15, 2019
1.4.13+zstd.1.4.3 Aug 20, 2019
1.3.1 Jul 5, 2017

#63 in Compression

Download history 7153/week @ 2020-02-09 7701/week @ 2020-02-16 10114/week @ 2020-02-23 10205/week @ 2020-03-01 12707/week @ 2020-03-08 12107/week @ 2020-03-15 12950/week @ 2020-03-22 11027/week @ 2020-03-29 9415/week @ 2020-04-05 10448/week @ 2020-04-12 13185/week @ 2020-04-19 12263/week @ 2020-04-26 13180/week @ 2020-05-03 12495/week @ 2020-05-10 12483/week @ 2020-05-17 12594/week @ 2020-05-24

50,043 downloads per month
Used in 111 crates (3 directly)

MIT/Apache

4.5MB
96K SLoC

BrightScript 73K SLoC // 0.2% comments Ruby HTML 10K SLoC // 0.0% comments Visual Basic 6K SLoC Coq 3K SLoC // 0.1% comments Scons 2.5K SLoC // 0.2% comments PureScript 1.5K SLoC // 0.1% comments Visual Studio Project 224 SLoC BASH 104 SLoC Logtalk 68 SLoC // 0.0% 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