// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only #pragma once // LZ4_NO_SHUFFLE is READ-ONLY: HDF5 filter 32004, plain LZ4 with no bit shuffle, written by DECTRIS // Eiger firmware 1.x. Nothing here produces it. It is last so the values of the others do not move - // the enum crosses the CBOR stream. // // CBF_BYTE_OFFSET and UINT16_WIDENED are READ-ONLY too, and never leave the process: they are how the // miniCBF and marCCD readers hand over a frame as the file stores it, so that the GPU path can upload // those bytes and decode them on the device. The image's mode is what they decode to (Int32). CBF_BYTE_OFFSET // is the x-CBF_BYTE_OFFSET payload; UINT16_WIDENED is unsigned 16-bit pixels, each one the int32 of the // same value - which is not CompressedImageMode::Uint16, whose largest value means an error pixel. enum class CompressionAlgorithm {BSHUF_LZ4, BSHUF_ZSTD, BSHUF_ZSTD_RLE, BSHUF_ZSTD_RLE_HUFF, NO_COMPRESSION, LZ4_NO_SHUFFLE, CBF_BYTE_OFFSET, UINT16_WIDENED};