6 releases

0.3.1 Jan 22, 2024
0.3.0 Nov 9, 2023
0.2.2 Nov 7, 2023
0.2.1 Mar 31, 2023
0.1.0 Feb 8, 2021

#144 in Compression

Download history 47/week @ 2023-11-23 36/week @ 2023-11-30 41/week @ 2023-12-07 13/week @ 2023-12-14 39/week @ 2023-12-21 51/week @ 2023-12-28 47/week @ 2024-01-04 47/week @ 2024-01-11 120/week @ 2024-01-18 105/week @ 2024-01-25 95/week @ 2024-02-01 191/week @ 2024-02-08 162/week @ 2024-02-15 214/week @ 2024-02-22 287/week @ 2024-02-29 169/week @ 2024-03-07

853 downloads per month
Used in 5 crates (3 directly)

Custom license

265KB
5.5K SLoC

C 5K SLoC // 0.2% comments Rust 290 SLoC Shell 8 SLoC

blosc-src

This is an FFI crate for using the Blosc compressor as implemented in c-blosc. The blosc compressor is a library of lossless compressors, which enables the developer to more easily use different compression algorithms depending on the data.

Non-rust dependencies

The crate builds c-blosc from source using the cc crate. As such it is required to have a C compiler installed.

Features

c-blosc can transparently use different compressors, but some of these are only available when included though cargo features. These include

  • zlib
  • zstd
  • lz4

When these are requested they will be built from source and available for use by blosc.

Usage

As this crate only provides FFI, the examples from c-blosc also functions as examples for this crate. A simple roundtrip is included in test.rs.

The developer must take special care in dealing with memory and in multi-threaded environments. It is recommended to create and use a safe interface instead of this crate directly.

Dependencies

~0–2MB
~33K SLoC