10 releases

new 0.3.6 Apr 17, 2025
0.3.4 Jun 22, 2024
0.3.1 Jan 22, 2024
0.3.0 Nov 9, 2023
0.1.0 Feb 8, 2021

#203 in Compression

Download history 292/week @ 2024-12-27 1179/week @ 2025-01-03 1015/week @ 2025-01-10 1096/week @ 2025-01-17 1065/week @ 2025-01-24 1104/week @ 2025-01-31 1052/week @ 2025-02-07 1079/week @ 2025-02-14 978/week @ 2025-02-21 854/week @ 2025-02-28 1051/week @ 2025-03-07 1562/week @ 2025-03-14 1113/week @ 2025-03-21 1642/week @ 2025-03-28 1352/week @ 2025-04-04 1206/week @ 2025-04-11

5,663 downloads per month
Used in 7 crates (4 directly)

Custom license

265KB
5.5K SLoC

C 5K SLoC // 0.2% comments Rust 298 SLoC Shell 10 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
  • snappy

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–1.5MB
~27K SLoC