Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are two RubyZip libraries that I was able to find.</p> <ol> <li><a href="http://www.chilkatsoft.com/ruby-zip.asp" rel="nofollow noreferrer">Chilkat's Ruby Zip Library</a></li> <li><a href="http://rubyzip.sourceforge.net/" rel="nofollow noreferrer">rubyzip on Sourceforge</a></li> </ol> <p>Chilkat's library definitely allows one to create a zip file in memory instead of writing it to disk automatically as seen in these links: <a href="http://www.example-code.com/ruby/ruby-zip-to-memory.asp" rel="nofollow noreferrer">Zip to Memory</a>, <a href="http://www.example-code.com/ruby/ruby-zip-from-memory.asp" rel="nofollow noreferrer">Zip from in memory data</a></p> <p>The one on SourceForge, on the other hand, may provide an option of zipping a file in memory but I'm not entirely certain since I'm very new to ruby. The SourceForge rubyzip is based on <code>java.util.zip</code> which has led to it having a class called <a href="http://rubyzip.sourceforge.net/classes/Zip/ZipOutputStream.html" rel="nofollow noreferrer"><code>ZipOutputStream</code></a>. I don't know how good the rubyzip implementation is, but with <code>java.util.zip</code> implementation the <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html" rel="nofollow noreferrer"><code>OutputStream</code></a> can be set to <code>ByteArrayOutputStream</code>, <code>FileOutputStream</code>, <code>FilterOutputStream</code>, <code>ObjectOutputStream</code>, <code>OutputStream</code>, <code>PipedOutputStream</code>....</p> <p>If that holds true for the rubyzip implementation then it should be a matter of using <code>ZipOutputStream</code> to pass in a <code>ByteArrayOutputStream</code> of sorts which would result in it being output to memory.</p> <p>If it doesn't exist in rubyzip, then I'm sure you could always write your own implementation and submit it for inclusion in rubyzip seeing as it is opensource.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload