www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - read gziped file

reply Andreas Schönfelder <passtschu freenet.de> writes:
Hello.

How can I read a gziped file?

Thanks, Andreas
Jan 19 2007
parent Frits van Bommel <fvbommel REMwOVExCAPSs.nl> writes:
Andreas Sch������������������������ï
½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ wrote:
 Hello.
 
 How can I read a gziped file?
The Phobos standard library (provided with DMD) includes zlib (www.zlib.net), which can handle gzip-compressed files. Unfortunately, std.zlib and std.zip don't seem to wrap the gzip support. You can still use the raw C API in module etc.c.zlib, though. The manual for it is at http://www.zlib.net/manual.html. From what I can tell, gzopen, gzread an gzclose are the functions you want. Note: I've never used this myself.
Jan 19 2007