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 "bslz4"
10};
11
19
20typedef struct Codec_t {
21 std::string name;
22 int level;
23 int shuffle;
27 clear();
28 }
29
30 void clear() {
31 name = codecName[NDCODEC_NONE];
32 level = -1;
33 shuffle = -1;
34 compressor = -1;
35 }
36
37 bool empty() {
38 return this->name == codecName[NDCODEC_NONE];
39 }
40
41 bool operator==(const Codec_t& other) {
42 if (name == other.name &&
43 level == other.level &&
44 shuffle == other.shuffle &&
45 compressor == other.compressor) {
46 return true;
47 } else {
48 return false;
49 }
50 }
51 bool operator!=(const Codec_t& other) {
52 return ! (*this == other);
53 }
55
56#endif //Codec_H
NDCodecCompressor_t
Definition Codec.h:12
@ NDCODEC_NONE
Definition Codec.h:13
@ NDCODEC_BLOSC
Definition Codec.h:15
@ NDCODEC_JPEG
Definition Codec.h:14
@ NDCODEC_LZ4
Definition Codec.h:16
@ NDCODEC_BSLZ4
Definition Codec.h:17
Definition Codec.h:20
void clear()
Definition Codec.h:30
Codec_t()
Definition Codec.h:26
int shuffle
Shuffle type.
Definition Codec.h:23
int level
Compression level.
Definition Codec.h:22
bool operator==(const Codec_t &other)
Definition Codec.h:41
bool empty()
Definition Codec.h:37
bool operator!=(const Codec_t &other)
Definition Codec.h:51
std::string name
Name of the codec used to compress the data.
Definition Codec.h:21
int compressor
Compressor type.
Definition Codec.h:24