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:
parent
b19aec7eeb
commit
8a0c00b856
7 changed files with 241 additions and 378 deletions
|
@ -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. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue