8 releases

0.3.4 Jun 22, 2024
0.3.2 May 23, 2024
0.3.1 Jan 22, 2024
0.3.0 Nov 9, 2023
0.1.0 Feb 8, 2021

#129 in Compression

Download history 331/week @ 2024-06-26 422/week @ 2024-07-03 475/week @ 2024-07-10 474/week @ 2024-07-17 481/week @ 2024-07-24 437/week @ 2024-07-31 546/week @ 2024-08-07 525/week @ 2024-08-14 944/week @ 2024-08-21 935/week @ 2024-08-28 600/week @ 2024-09-04 870/week @ 2024-09-11 671/week @ 2024-09-18 1122/week @ 2024-09-25 531/week @ 2024-10-02 569/week @ 2024-10-09

3,228 downloads per month
Used in 7 crates (5 directly)

Custom license

265KB
5.5K SLoC

C 5K SLoC // 0.2% comments Rust 300 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
  • 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.4MB
~25K SLoC