diff options
author | Robert Hensing <robert@roberthensing.nl> | 2023-04-17 11:41:50 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2023-04-17 11:41:50 +0200 |
commit | cb2615cf4735cf28a6e538544c9abbf40cdd24a9 (patch) | |
tree | 55eb0a30ff9bba54e568facec1ff0cdfeffbba73 /src/libutil/compression.cc | |
parent | a9759407e55fb02c6e306fdd9fcedd821e465024 (diff) | |
parent | 9af9c260fc0aff9e20a1c2e965249a20394ca22a (diff) |
Merge remote-tracking branch 'upstream/master' into source-path
Diffstat (limited to 'src/libutil/compression.cc')
-rw-r--r-- | src/libutil/compression.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libutil/compression.cc b/src/libutil/compression.cc index 89180e7a7..ba0847cde 100644 --- a/src/libutil/compression.cc +++ b/src/libutil/compression.cc @@ -23,7 +23,7 @@ struct ChunkedCompressionSink : CompressionSink { uint8_t outbuf[32 * 1024]; - void write(std::string_view data) override + void writeUnbuffered(std::string_view data) override { const size_t CHUNK_SIZE = sizeof(outbuf) << 2; while (!data.empty()) { @@ -103,7 +103,7 @@ struct ArchiveCompressionSink : CompressionSink throw Error(reason, archive_error_string(this->archive)); } - void write(std::string_view data) override + void writeUnbuffered(std::string_view data) override { ssize_t result = archive_write_data(archive, data.data(), data.length()); if (result <= 0) check(result); @@ -136,7 +136,7 @@ struct NoneSink : CompressionSink warn("requested compression level '%d' not supported by compression method 'none'", level); } void finish() override { flush(); } - void write(std::string_view data) override { nextSink(data); } + void writeUnbuffered(std::string_view data) override { nextSink(data); } }; struct BrotliDecompressionSink : ChunkedCompressionSink |