Read and write gzip files easily.
Russel Winder via Digitalmars-d
digitalmars-d at puremagic.com
Sun May 3 08:00:24 PDT 2015
And there is Zipios++
http://zipios.sourceforge.net/
On Sun, 2015-05-03 at 14:33 +0000, via Digitalmars-d wrote:
> On Thursday, 20 February 2014 at 10:35:50 UTC, Stephan Schiffels
> wrote:
> > Hi Kamil,
> > I am glad someone has the exact same problem as I had. I
> > actually solved this, inspired by the python API you quoted
> > above. I wrote these classes:
> > GzipInputRange, GzipByLine, and GzipOut.
> > Here is how I can now use them:
> >
>
> I've polished your module a bit at:
>
> https://github.com/nordlow/justd/blob/611ae3aac35a085af966e0c3b717deb
> 0012f637b/zio.d
>
> Reflections:
>
> - Performance is terrible even with -release -noboundscheck
> -unittest. About 20 times slower than zcat $F | wc -l. I'm
> guessing
>
> _chunkRange.front.dup
>
> slows things down. I tried removing the .dup but then I get
>
> std.zlib.ZlibException at std/zlib.d(59): data error
>
> I don't believe we should have to do a copy of _chunkRange.front
> but I can't figure out how to solve it. Anybody understands how
> to fix this?
>
> - Shouldn't GzipOut.finish() call this.close()? Otherwise the
> file remains unflushed.
> - And what about calling this.close() in GzipOut.~this()? Is that
> needed to?
--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder at ekiga.net
41 Buckmaster Road m: +44 7770 465 077 xmpp: russel at winder.org.uk
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150503/0e7cf8fa/attachment.sig>
More information about the Digitalmars-d
mailing list