aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/compression.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-05-04 15:46:25 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-05-04 16:16:53 +0200
commit0d4a10e910e1916a6f36cb9af6b68817172b51a9 (patch)
treedc2525bab942c3bdddfd22e40fdaacc525c8a937 /src/libutil/compression.hh
parentc6a21aed07520e11dfae09cf9eff9e34e60906d8 (diff)
Do compression in a sink
Diffstat (limited to 'src/libutil/compression.hh')
-rw-r--r--src/libutil/compression.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libutil/compression.hh b/src/libutil/compression.hh
index ed3c46386..eacf559d6 100644
--- a/src/libutil/compression.hh
+++ b/src/libutil/compression.hh
@@ -2,6 +2,7 @@
#include "ref.hh"
#include "types.hh"
+#include "serialise.hh"
#include <string>
@@ -11,6 +12,13 @@ ref<std::string> compress(const std::string & method, const std::string & in);
ref<std::string> decompress(const std::string & method, const std::string & in);
+struct CompressionSink : BufferedSink
+{
+ virtual void finish() = 0;
+};
+
+ref<CompressionSink> makeCompressionSink(const std::string & method, Sink & nextSink);
+
MakeError(UnknownCompressionMethod, Error);
}