areaDetector 3-14
EPICS areaDetector framework
Codec.h
Go to the documentation of this file.
1#ifndef Codec_H
2#define Codec_H
3
4static std::string codecName[] = {
5 "",
6 "jpeg",
7 "blosc",
8 "lz4",
9 "lz4hdf5",
10 "bslz4"
11};
12
21
22typedef struct Codec_t {
23 std::string name;
24 int level;
25 int shuffle;
29 clear();
30 }
31
32 void clear() {
33 name = codecName[NDCODEC_NONE];
34 level = -1;
35 shuffle = -1;
36 compressor = -1;
37 }
38
39 bool empty() {
40 return this->name == codecName[NDCODEC_NONE];
41 }
42
43 bool operator==(const Codec_t& other) {
44 if (name == other.name &&
45 level == other.level &&
46 shuffle == other.shuffle &&
47 compressor == other.compressor) {
48 return true;
49 } else {
50 return false;
51 }
52 }
53 bool operator!=(const Codec_t& other) {
54 return ! (*this == other);
55 }
57
58#endif //Codec_H
NDCodecCompressor_t
Definition Codec.h:13
@ NDCODEC_NONE
Definition Codec.h:14
@ NDCODEC_LZ4HDF5
Definition Codec.h:18
@ NDCODEC_BLOSC
Definition Codec.h:16
@ NDCODEC_JPEG
Definition Codec.h:15
@ NDCODEC_LZ4
Definition Codec.h:17
@ NDCODEC_BSLZ4
Definition Codec.h:19
Definition Codec.h:22
void clear()
Definition Codec.h:32
Codec_t()
Definition Codec.h:28
int shuffle
Shuffle type.
Definition Codec.h:25
int level
Compression level.
Definition Codec.h:24
bool operator==(const Codec_t &other)
Definition Codec.h:43
bool empty()
Definition Codec.h:39
bool operator!=(const Codec_t &other)
Definition Codec.h:53
std::string name
Name of the codec used to compress the data.
Definition Codec.h:23
int compressor
Compressor type.
Definition Codec.h:26