2

Possible Duplicate:
How to create zip file only in memory in ruby?

Is anybody aware of a open source Ruby library that allows the user to process zip file entries in memory? i.e. without writing them to disk

Community
  • 1
  • 1
David Snowsill
  • 1,467
  • 2
  • 16
  • 21

1 Answers1

6

Hi I'm using rubyzip library. You can do something like this:

Zip::ZipFile.foreach(file) do |entry|
    istream = entry.get_input_stream
    data = istream.read
    #...
end
pejuko
  • 1,654
  • 1
  • 10
  • 5