<div dir="ltr"><div><div>Wow, that's unexpected :)<br><br></div><div>Unfortunately, there's no standard module for processing gzip/bz2. The former can be dealt with using etc.c.zlib, but there's no convenient interface for working with file as a stream. Thus, the easiest way that I know of is as follows:<br>

</div><br></div>import std.stdio, std.process;<br><div><div><span>auto</span> <span>pipe</span> <span>=</span> <span>pipeShell</span><span>(</span><span>"gunzip -c "</span> <span>~</span> <span>filename</span><span>); // replace with pigz if you wish<br>

</span></div><div>File input = <span></span><span>pipe</span><span>.</span><span>stdout</span><span>;<br><br></span></div><div><span>Regarding your second request, this forum is not an appropriate place to provide usage examples for a library, so that will go into a private e-mail.<br>

</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 19, 2014 at 7:51 PM, Kamil Slowikowski <span dir="ltr"><<a href="mailto:kslowikowski@gmail.com" target="_blank">kslowikowski@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I have a second request. I would like to start using D more in my work,<br>
and in particular I would like to use and extend the BioD library. Artem<br>
Tarasov made a nice module to handle BGZF, and I would like to see an<br>
example like my Python code above using Artem's module.<br></blockquote></div></div></div>