summaryrefslogtreecommitdiff
path: root/vdr-vdrmanager/compressor.h
blob: 933d4c046e2b6af4af5a83d52eaa6c089832806e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
 * compressor.h
 *
 *  Created on: 23.03.2013
 *      Author: bju
 */
#ifndef COMPRESSOR_H_
#define COMPRESSOR_H_

#include <string>

#define COMPRESSION_NONE 0

#if VDRMANAGER_USE_ZLIB || VDRMANAGER_USE_GZIP

#define COMPRESSION_ZLIB 1
#define COMPRESSION_GZIP 2

using namespace std;

class cCompressor {
private:
  char * data;
  size_t size;
public:
  cCompressor();
  virtual ~cCompressor();
#if VDRMANAGER_USE_GZIP
  bool CompressGzip(string text);
#endif
#if VDRMANAGER_USE_ZLIB
  bool CompressZlib(string text);
#endif
  char * GetData();
  size_t getDataSize();
};

#endif

#endif /* COMPRESSOR_H_ */