Read and write gzip files easily.

Artem Tarasov lomereiter at gmail.com
Wed Feb 19 08:27:12 PST 2014


Wow, that's unexpected :)

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:

import std.stdio, std.process;
auto pipe = pipeShell("gunzip -c " ~ filename); // replace with pigz if you
wish
File input = pipe.stdout;

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.


On Wed, Feb 19, 2014 at 7:51 PM, Kamil Slowikowski
<kslowikowski at gmail.com>wrote:

>
> I have a second request. I would like to start using D more in my work,
> and in particular I would like to use and extend the BioD library. Artem
> Tarasov made a nice module to handle BGZF, and I would like to see an
> example like my Python code above using Artem's module.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140219/aba424fd/attachment-0001.html>


More information about the Digitalmars-d mailing list