blosc-rs
Rust bindings for blosc - a blocking, shuffling and lossless compression library.
Provide a safe interface to the blosc library. The crate has zero runtime dependencies.
Getting Started
To use this library, add the following to your Cargo.toml:
[]
= "0.3"
# Or alternatively, rename the crate to `blosc`
= { = "blosc-rs", = "0.3" }
In the following example we compress a vector of integers and then decompress it back:
use ;
let data: = ;
let data_bytes = unsafe ;
let numinternalthreads = 4;
let compressed = default
.typesize
.numinternalthreads
.compress
.expect;
let decoder = new.expect;
// Read some items using random access, without decompressing the entire buffer
assert_eq!;
assert_eq!;
assert_eq!;
// Decompress the entire buffer
let decompressed = decoder.decompress.expect;
assert_eq!;