JFJochCompressor: Use Kal's bitshuffle compressor

This commit is contained in:
2023-08-04 15:47:32 +02:00
parent defa97c88b
commit 9144058f0c
3 changed files with 7 additions and 2 deletions
+2 -2
View File
@@ -6,6 +6,7 @@
#include <stdexcept>
#include <cstring>
#include <bitshuffle/bitshuffle_internals.h>
#include <bitshuffle_dectris/src/bitshuffle.h>
#include <zstd.h>
#include <lz4/lz4.h>
@@ -22,8 +23,7 @@ JFJochBitShuffleCompressor::JFJochBitShuffleCompressor(CompressionAlgorithm in_a
size_t JFJochBitShuffleCompressor::CompressBlock(char *dest, const char *source, size_t nelements, size_t elem_size) {
// Assert nelements < block_size
const char *src_ptr;
int64_t bshuf_ret = bshuf_trans_bit_elem(source, tmp_space.data(), nelements, elem_size);
int64_t bshuf_ret = bitshuf_encode_block(tmp_space.data(), source, scratch, nelements, elem_size);
if (bshuf_ret < 0)
throw JFJochException(JFJochExceptionCategory::Compression, "bshuf_trans_bit_elem error");
src_ptr = tmp_space.data();