You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But these are entirely different APIs. For the OutputStream API in the first example... there doens't seem to be any way to specify STORED rather than DEFLATE?
For the Zip::Entry/add API in the second example... there doesn't seem to be any way to pass it something that isn't a real file object. If I pass it a string to zipfile.add(entry, "foo bar"), I get No such file or directory @ rb_file_s_lstat - foo bar.
Is there any API that does both things? Looking at the source for the #add method, it's described as a "convenience method", so maybe I can do just what it's doing myself in more steps -- but it's implementation accesses the @entry_set iVar, so I can't do just what it does in my own caller code....
Is there any API that has all the features I need?
The text was updated successfully, but these errors were encountered:
I'm getting a bit confused about the rubyzip api.
I am creating a zip file, and want to add an entry to it where:
File
)STORED
, mode notDEFLATE
.For the first criteria, not having a local file, I think this would work:
For the second criteria,
STORED
rather thanDEFLATE
, I figured out with difficulty this:But these are entirely different APIs. For the
OutputStream
API in the first example... there doens't seem to be any way to specifySTORED
rather thanDEFLATE
?For the
Zip::Entry
/add API in the second example... there doesn't seem to be any way to pass it something that isn't a real file object. If I pass it a string tozipfile.add(entry, "foo bar")
, I getNo such file or directory @ rb_file_s_lstat - foo bar
.Is there any API that does both things? Looking at the source for the #add method, it's described as a "convenience method", so maybe I can do just what it's doing myself in more steps -- but it's implementation accesses the
@entry_set
iVar, so I can't do just what it does in my own caller code....Is there any API that has all the features I need?
The text was updated successfully, but these errors were encountered: