On Tue, Mar 12, 2002 at 12:34:29PM +0900, Massimiliano Mirra wrote: > I can't seem to process from within Ruby with gzip files that exceed a > certain (very) minimal size. > > > data = File.open('rdoc-alpha-c.tgz') {|f| f.read} > > IO.popen('gzip -dc', 'w+') do |gz| > gz.syswrite(data) > gz.close_write > end > > > The above code just hangs everything. From a console, gzip -dc > <filename> works just fine. I'm clueless again and this time I'm not > sure it's something trivial. :-\ Any idea? > > Massimiliano Look at the return value from syswrite(). It may not be writing all the bytes at once; you may want to use a loop and slice! to write the rest of the data that didn't get written. Paul