From: Brian Candler Date: 2011-09-07T12:27:35+09:00 Subject: Re: read .gz file directly CC Chen wrote in post #1020179: > How to read the xxx.gz file directly and don't decompress the file. You *don't* want to decompress the file? data = File.read("foo.gz") You *do* want to decompress the file? Use the built-in zlib support: require 'zlib' data = Zlib::GzipReader.open("foo.gz") { |f| f.read } -- Posted via http://www.ruby-forum.com/.