Sha256: 4508795c126da3a0609d2bd34cb25b030c9581726c5b928c695a9c5ff7b8a496
Contents?: true
Size: 636 Bytes
Versions: 8
Compression:
Stored size: 636 Bytes
Contents
require 'zip' require 'zlib' dir = Dir.new("./") started_at = Time.now fname2 = "zipped.zip" Zip::ZipFile.open(fname2, 'w') do |f| dir.each do |fname| puts "merging #{fname} into #{fname2}" f.add(File.basename(fname), fname) end end ended_at = Time.now puts "zip duration=#{(ended_at.to_f - started_at.to_f)}" # todo: need to tar these first. started_at = Time.now fname2 = "gzipped.gzip" Zlib::GzipWriter.open(fname2) do |gz| dir.each do |fname| puts "merging #{fname} into #{fname2}" gz.write(File.basename(fname), fname) end end ended_at = Time.now puts "gzip duration=#{(ended_at.to_f - started_at.to_f)}"
Version data entries
8 entries across 8 versions & 2 rubygems