mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
Fix brotli compression of files > 128 KiB
This has been broken since faa31f4084
.
This commit is contained in:
parent
b60b0d62d6
commit
8d651a1f68
1 changed files with 3 additions and 2 deletions
|
@ -28,7 +28,7 @@ struct ChunkedCompressionSink : CompressionSink
|
|||
const size_t CHUNK_SIZE = sizeof(outbuf) << 2;
|
||||
while (!data.empty()) {
|
||||
size_t n = std::min(CHUNK_SIZE, data.size());
|
||||
writeInternal(data);
|
||||
writeInternal(data.substr(0, n));
|
||||
data.remove_prefix(n);
|
||||
}
|
||||
}
|
||||
|
@ -265,7 +265,8 @@ struct BrotliCompressionSink : ChunkedCompressionSink
|
|||
}
|
||||
};
|
||||
|
||||
std::unique_ptr<Source> makeDecompressionSource(Source & prev) {
|
||||
std::unique_ptr<Source> makeDecompressionSource(Source & prev)
|
||||
{
|
||||
return std::unique_ptr<Source>(new ArchiveDecompressionSource(prev));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue