hdf5-bitshuffle

Crates.iohdf5-bitshuffle
lib.rshdf5-bitshuffle
version0.9.0
sourcesrc
created_at2021-05-20 13:01:01.826296
updated_at2022-02-27 09:10:29.896419
descriptionHDF5 bitshuffle plugin for Rust
homepage
repositoryhttps://git.3lp.cx/dyadkin/cryiorust
max_upload_size
id399962
size702,603
(satarsa)

documentation

README

hdf5-bitshuffle

This is a Rust binding of bitshuffle HDF5 filter. Some HDF5 files use this not standard plugin bitshuffle (mainly produced by the Dectris Eiger detectors). This crate makes a binding for Rust.

To use this plugin just call in your code before using any HDF5 API:

use hdf5_bitshuffle::register_bitshuffle_plugin;

fn main() {
     register_bitshuffle_plugin();
}

Or, if you want more control, you can call it manually:

use std::sync::Once;
use hdf5_bitshuffle::bshuf_register_h5filter;

static REGISTER_BITSHUFFLE: Once = Once::new();

fn main() {
    unsafe {
        REGISTER_BITSHUFFLE.call_once(|| {
                if bshuf_register_h5filter() < 0 {
                    panic!("Could not register bitshuffle plugin for HDF5");
                }
            });
        }
}

License: MIT

Commit count: 0

cargo fmt