summaryrefslogtreecommitdiff
path: root/vdr-vdrmanager/compressor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vdr-vdrmanager/compressor.cpp')
-rw-r--r--vdr-vdrmanager/compressor.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/vdr-vdrmanager/compressor.cpp b/vdr-vdrmanager/compressor.cpp
index c8322b8..b4c9051 100644
--- a/vdr-vdrmanager/compressor.cpp
+++ b/vdr-vdrmanager/compressor.cpp
@@ -5,14 +5,21 @@
* Author: bju
*/
-#include "compressor.h"
+#if VDRMANAGER_USE_ZLIB || VDRMANAGER_USE_GZIP
-#include <zlib.h>
#include <malloc.h>
#include <string.h>
#include <stdlib.h>
+#include <unistd.h>
+
+#include "compressor.h"
+
+#if VDRMANAGER_USE_ZLIB
+#include <zlib.h>
#define CHUNK 16384
+#endif
+
cCompressor::cCompressor() {
size = 0;
@@ -23,6 +30,8 @@ cCompressor::~cCompressor() {
}
+#if VDRMANAGER_USE_GZIP
+
bool cCompressor::CompressGzip(string text) {
int in_fd[2];
@@ -94,6 +103,10 @@ bool cCompressor::CompressGzip(string text) {
return true;
}
+#endif
+
+#if VDRMANAGER_USE_ZLIB
+
bool cCompressor::CompressZlib(string text) {
int ret, flush;
@@ -160,6 +173,8 @@ bool cCompressor::CompressZlib(string text) {
return true;
}
+#endif
+
char * cCompressor::GetData() {
return data;
}
@@ -168,3 +183,4 @@ size_t cCompressor::getDataSize() {
return size;
}
+#endif