I wonder if the GZip.jl package would help?

--Tim

On Sunday, January 04, 2015 05:11:50 PM ivo welch wrote:
> still not obviois.  readcsv does have a dispatch for a stream (good),
> but I really need a popen function.
>   x=readcsv(open(`gzcat myfile.csv.gz`, "r"))
> is wrong.  x=run(`gzcat myfiles.csv.gz`) doesn't send the output to x
> for further piping as far as I can see, so readcsv(x) doesn't do it.
> 
> /iaw
> 
> ----
> Ivo Welch ([email protected])
> http://www.ivo-welch.info/
> ----
> Ivo Welch ([email protected])
> http://www.ivo-welch.info/
> J. Fred Weston Distinguished Professor of Finance
> Anderson School at UCLA, C519
> Director, UCLA Anderson Fink Center for Finance and Investments
> Free Finance Textbook, http://book.ivo-welch.info/
> Exec Editor, Critical Finance Review,
> http://www.critical-finance-review.org/ Editor and Publisher, FAMe,
> http://www.fame-jagazine.com/
> 
> On Sun, Jan 4, 2015 at 4:55 PM,  <[email protected]> wrote:
> > On Monday, January 5, 2015 9:51:18 AM UTC+10, ivo welch wrote:
> >> dear julia users:  beginner's question (apologies, more will be coming).
> >> it's probably obvious.
> >> 
> >> I am storing files in compressed csv form.  I want to use the built-in
> >> julia readcsv() function.  but I also need to pipe through a decompressor
> >> first.  so, I tried a variety of forms, like
> >> 
> >>    d= readcsv("/usr/bin/gzcat ./myfile.csv.gz |")
> >>    d= readcsv("`/usr/bin/gzcat ./myfile.csv.gz`")
> >> 
> >> I can type the file with run(`/usr/bin/gzcat ./crsp90.csv.gz"), but
> >> wrapping a readcsv around it does not capture it.  how does one do this?
> > 
> > Can you run the command with open()
> > http://docs.julialang.org/en/latest/stdlib/base/?highlight=spawn#Base.open
> > and pass the stream it returns to readcsv?
> > 
> > Cheers
> > Lex
> > 
> >> regards,
> >> 
> >> /iaw

Reply via email to