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
I was able to make it work this way. I guess it won't handle encryption...
Zip::File.open( zipfile_name, Zip::File::CREATE ) do | zipfile |
files.each.with_index(1) do | filename, i |
append_file zipfile, filename, "#{ local_path }/#{ filename }"
end
end
BUFFER_SIZE = 1000000
def append_file zipfile, filename, path_and_file
zipfile.get_output_stream( filename ) do | os |
open( path_and_file ) do | f |
while buffer = f.read( BUFFER_SIZE )
os.write buffer
end
end
end
end
I'm doing some issue gardening 🌱🌿 🌷 and came upon this issue. Since it's quite old I just wanted to ask if this is still relevant? If it isn't, maybe we can close this issue?
By closing some old issues we reduce the list of open issues to a more manageable set.
zipfile.add(filename, folder + '/' + filename)
seems to be using a large amount of memory.What is a good way to add a file to a zip file using a minimum of memory?
The text was updated successfully, but these errors were encountered: