snix/third_party/nix/src/libutil/compression.hh
Vincent Ambo 3652326ed2 refactor(3p/nix): Anchor local includes at src/
Previously all includes were anchored in one global mess of header
files. This moves the includes into filesystem "namespaces" (if you
will) for each sub-package of Nix.

Note: This commit does not introduce the relevant build system changes.
2020-05-27 21:56:34 +01:00

31 lines
853 B
C++

#pragma once
#include <string>
#include "libutil/ref.hh"
#include "libutil/serialise.hh"
#include "libutil/types.hh"
namespace nix {
struct CompressionSink : BufferedSink {
virtual void finish() = 0;
};
ref<std::string> decompress(const std::string& method, const std::string& in);
ref<CompressionSink> makeDecompressionSink(const std::string& method,
Sink& nextSink);
ref<std::string> compress(const std::string& method, const std::string& in,
const bool parallel = false);
ref<CompressionSink> makeCompressionSink(const std::string& method,
Sink& nextSink,
const bool parallel = false);
MakeError(UnknownCompressionMethod, Error);
MakeError(CompressionError, Error);
} // namespace nix