1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
//! This is a Rust binding of bitshuffle HDF5 filter. //! Some HDF5 files use this not standard plugin //! [bitshuffle](https://github.com/kiyo-masui/bitshuffle) //! (mainly produced by the Dectris Eiger detectors). //! This crate makes a binding for Rust. //! //! Usage example: //! ``` //! 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"); //! } //! }); //! } //! } //! ``` #![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] extern "C" { /// Registers bitshuffle plugin. pub fn bshuf_register_h5filter() -> ::std::os::raw::c_int; }