mirror of
https://github.com/NixOS/nix
synced 2025-06-29 06:21:14 +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
|
@ -8,14 +8,18 @@
|
|||
|
||||
namespace nix {
|
||||
|
||||
struct CompressionSink : BufferedSink
|
||||
struct CompressionSink : BufferedSink, FinishSink
|
||||
{
|
||||
virtual void finish() = 0;
|
||||
using BufferedSink::operator ();
|
||||
using BufferedSink::write;
|
||||
using FinishSink::finish;
|
||||
};
|
||||
|
||||
std::unique_ptr<Source> makeDecompressionSource(Source & prev);
|
||||
|
||||
ref<std::string> decompress(const std::string & method, const std::string & in);
|
||||
|
||||
ref<CompressionSink> makeDecompressionSink(const std::string & method, Sink & nextSink);
|
||||
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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue