aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/compression.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-01-17 22:20:05 +0100
committerEelco Dolstra <edolstra@gmail.com>2022-01-18 11:12:30 +0100
commitd62a9390fcdc0f9e4971e5fab2f667567237b252 (patch)
treecdbf6aef8b15b2ba5f02f7426ec2e5cd1f595e39 /src/libutil/compression.hh
parent52ee7ec0028263f04e15c05256ca90fa62a0da66 (diff)
Get rid of std::shared_ptr<std::string> and ref<std::string>
These were needed back in the pre-C++11 era because we didn't have move semantics. But now we do.
Diffstat (limited to 'src/libutil/compression.hh')
-rw-r--r--src/libutil/compression.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/compression.hh b/src/libutil/compression.hh
index 9b1e4a9d4..c470b82a5 100644
--- a/src/libutil/compression.hh
+++ b/src/libutil/compression.hh
@@ -15,11 +15,11 @@ struct CompressionSink : BufferedSink, FinishSink
using FinishSink::finish;
};
-ref<std::string> decompress(const std::string & method, const std::string & in);
+std::string decompress(const std::string & method, std::string_view in);
std::unique_ptr<FinishSink> makeDecompressionSink(const std::string & method, Sink & nextSink);
-ref<std::string> compress(const std::string & method, const std::string & in, const bool parallel = false, int level = -1);
+std::string compress(const std::string & method, std::string_view in, const bool parallel = false, int level = -1);
ref<CompressionSink> makeCompressionSink(const std::string & method, Sink & nextSink, const bool parallel = false, int level = -1);