| 1 |
/* |
| 2 |
* Bitshuffle HDF5 filter |
| 3 |
* |
| 4 |
* This file is part of Bitshuffle |
| 5 |
* Author: Kiyoshi Masui <[email protected]> |
| 6 |
* Website: https://www.github.com/kiyo-masui/bitshuffle |
| 7 |
* Created: 2014 |
| 8 |
* |
| 9 |
* See LICENSE file for details about copyright and rights to use. |
| 10 |
* |
| 11 |
* |
| 12 |
* Header File |
| 13 |
* |
| 14 |
* Filter Options |
| 15 |
* -------------- |
| 16 |
* block_size (option slot 0) : integer (optional) |
| 17 |
* What block size to use (in elements not bytes). Default is 0, |
| 18 |
* for which bitshuffle will pick a block size with a target of 8kb. |
| 19 |
* Compression (option slot 1) : 0 or BSHUF_H5_COMPRESS_LZ4 |
| 20 |
* Whether to apply LZ4 compression to the data after bitshuffling. |
| 21 |
* This is much faster than applying compression as a second filter |
| 22 |
* because it is done when the small block of data is already in the |
| 23 |
* L1 cache. |
| 24 |
* |
| 25 |
* For LZ4 compression, the compressed format of the data is the same as |
| 26 |
* for the normal LZ4 filter described in |
| 27 |
* https://support.hdfgroup.org/services/filters/HDF5_LZ4.pdf. |
| 28 |
* |
| 29 |
*/ |
| 30 |
|
| 31 |
|
| 32 |
#ifndef BSHUF_H5FILTER_H |
| 33 |
#define BSHUF_H5FILTER_H |
| 34 |
|
| 35 |
#ifdef __cplusplus |
| 36 |
extern "C" { |
| 37 |
#endif |
| 38 |
|
| 39 |
#define H5Z_class_t_vers 2 |
| 40 |
#include "hdf5.h" |
| 41 |
|
| 42 |
|
| 43 |
#define BSHUF_H5FILTER 32008 |
| 44 |
|
| 45 |
|
| 46 |
#define BSHUF_H5_COMPRESS_LZ4 2 |
| 47 |
#define BSHUF_H5_COMPRESS_ZSTD 3 |
| 48 |
|
| 49 |
|
| 50 |
extern H5Z_class_t bshuf_H5Filter[1]; |
| 51 |
|
| 52 |
|
| 53 |
/* ---- bshuf_register_h5filter ---- |
| 54 |
* |
| 55 |
* Register the bitshuffle HDF5 filter within the HDF5 library. |
| 56 |
* |
| 57 |
* Call this before using the bitshuffle HDF5 filter from C unless |
| 58 |
* using dynamically loaded filters. |
| 59 |
* |
| 60 |
*/ |
| 61 |
int bshuf_register_h5filter(void); |
| 62 |
|
| 63 |
#ifdef __cplusplus |
| 64 |
} // extern "C" |
| 65 |
#endif |
| 66 |
|
| 67 |
#endif // BSHUF_H5FILTER_H |