mirror of
https://github.com/NixOS/nix
synced 2025-06-29 06:21:14 +02:00
decompress(): Use a Source and Sink
This allows decompression to happen in O(1) memory.
This commit is contained in:
parent
64441f0551
commit
3e6b194d78
6 changed files with 210 additions and 91 deletions
|
@ -8,10 +8,12 @@
|
|||
|
||||
namespace nix {
|
||||
|
||||
ref<std::string> compress(const std::string & method, const std::string & in, const bool parallel = false);
|
||||
|
||||
ref<std::string> decompress(const std::string & method, const std::string & in);
|
||||
|
||||
void decompress(const std::string & method, Source & source, Sink & sink);
|
||||
|
||||
ref<std::string> compress(const std::string & method, const std::string & in, const bool parallel = false);
|
||||
|
||||
struct CompressionSink : BufferedSink
|
||||
{
|
||||
virtual void finish() = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue