diff options
Diffstat (limited to 'src/libutil/compression.hh')
-rw-r--r-- | src/libutil/compression.hh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/libutil/compression.hh b/src/libutil/compression.hh new file mode 100644 index 000000000000..eacf559d65e9 --- /dev/null +++ b/src/libutil/compression.hh @@ -0,0 +1,24 @@ +#pragma once + +#include "ref.hh" +#include "types.hh" +#include "serialise.hh" + +#include <string> + +namespace nix { + +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); + +} |