13 lines
180 B
Ruby
13 lines
180 B
Ruby
|
#!/usr/bin/env ruby
|
||
|
|
||
|
#
|
||
|
# Add a file from memory and save it.
|
||
|
#
|
||
|
|
||
|
require 'zip'
|
||
|
|
||
|
# example usage
|
||
|
zip = Zip::Archive.new
|
||
|
zip.add_file("elite.txt", "A" * 1024)
|
||
|
zip.save_to("lolz.zip")
|