import std.stdio; import std.process; import std.string; void main(string[] args){ string fileName = args[1]; string command = "gzip -dc " ~ fileName ; auto dmd = executeShell(command); if(dmd.status != 0){ writeln("Compilation failed:\n", dmd.output); } else{ auto all=chomp(dmd.output).split("\n"); writeln(typeid(all)); for(int i=0; i<all.length; i++){ writeln(all[i]); } } }
How to open a compressed file in gz format ?
sharkloc via Digitalmars-d-learn Sun, 14 Mar 2021 18:40:39 -0700
I want to read the content(file.gz) line by line,the following
code is not friendly to large files of hundreds of Gb, and the
memory overhead is also very large.
- How to open a compressed file... sharkloc via Digitalmars-d-learn
- Re: How to open a compre... frame via Digitalmars-d-learn
- Re: How to open a compre... Steven Schveighoffer via Digitalmars-d-learn