1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +02:00

Use libarchive for all compression

This commit is contained in:
Yorick van Pelt 2019-12-10 15:47:38 +07:00 committed by Lars Jellema
parent b19aec7eeb
commit 8a0c00b856
No known key found for this signature in database
GPG key ID: 563A03936D48B4BC
7 changed files with 241 additions and 378 deletions

View file

@ -25,6 +25,13 @@ struct NullSink : Sink
{ }
};
struct FinishSink : virtual Sink
{
virtual void finish() = 0;
};
/* A buffered abstract sink. Warning: a BufferedSink should not be
used from multiple threads concurrently. */
struct BufferedSink : virtual Sink
@ -281,6 +288,7 @@ struct ChainSource : Source
size_t read(char * data, size_t len) override;
};
std::unique_ptr<FinishSink> sourceToSink(std::function<void(Source &)> fun);
/* Convert a function that feeds data into a Sink into a Source. The
Source executes the function as a coroutine. */