Search code examples
rubyrubygemsgzipjrubyunzip

Unzipping a file (.gz) in JRuby using Gem


Does anyone know of a gem that is compatible with JRuby 1.6.5 that can extract the files from a .gz zip file?

Thanks!


Solution

  • I use Zlib in my JRuby app. It is a standard Ruby library. http://www.ruby-doc.org/stdlib-1.8.7/libdoc/zlib/rdoc/index.html

    In Rails you can also use ActiveSupport::Gzip http://api.rubyonrails.org/classes/ActiveSupport/Gzip.html

    Here are examples how to unzip a file: Zlib in Ruby to uncompress .gz