just to add my 0.02 here as I happened on this and I have avoided using gzip 
stuff from nim as it is too slow. Mark (hi!), I know you linked to 
[hts-nim]([https://github.com/brentp/hts-nim](https://github.com/brentp/hts-nim))
 but that will give you multi-threaded decompression for bgzipped files and a 
VCF parser. If you want to parse the VCF yourself, you can use 
[hts_lines]([https://github.com/brentp/hts-nim/blob/master/src/hts/files.nim#L38](https://github.com/brentp/hts-nim/blob/master/src/hts/files.nim#L38))
 which will do multi-threaded decompression and give you an iterator of lines.

I know this side-steps your original problem and it would be great to see the 
Stream stuff faster in nim, but, since you probably have htslib on your system, 
you can use hts-nim. I thought about wrapping zlib.h or bgzip.h directly with a 
lines iterator in its own module but havent done so yet.

Reply via email to