mirror of
https://github.com/NixOS/nix
synced 2025-06-26 03:21:16 +02:00
Do compression in a sink
This commit is contained in:
parent
c6a21aed07
commit
0d4a10e910
6 changed files with 208 additions and 139 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "ref.hh"
|
||||
#include "types.hh"
|
||||
#include "serialise.hh"
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@ -11,6 +12,13 @@ ref<std::string> compress(const std::string & method, const std::string & in);
|
|||
|
||||
ref<std::string> decompress(const std::string & method, const std::string & in);
|
||||
|
||||
struct CompressionSink : BufferedSink
|
||||
{
|
||||
virtual void finish() = 0;
|
||||
};
|
||||
|
||||
ref<CompressionSink> makeCompressionSink(const std::string & method, Sink & nextSink);
|
||||
|
||||
MakeError(UnknownCompressionMethod, Error);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue