On Friday, 7 August 2015 at 11:45:00 UTC, Daniel Kozak wrote:
On Friday, 7 August 2015 at 09:12:32 UTC, yawniek wrote:
[...]
Can you try it without write operation (comment out all write)?
And than try it without uncompression?
// without compression:
void main(string[] args)
{
auto f = File(args[1], "r");
foreach (buffer; f.byChunk(4096))
{
write(cast(char[])buffer);
}
}
0.03s user 0.09s system 11% cpu 1.046 total
// without write:
void main(string[] args)
{
auto f = File(args[1], "r");
auto uncompressor = new UnCompress(HeaderFormat.gzip);
foreach (buffer; f.byChunk(4096))
{
auto uncompressed =
cast(char[])(uncompressor.uncompress(buffer));
}
uncompressor.flush;
}
2.82s user 0.05s system 99% cpu 2.873 total