Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
require 'json'
files = []
offset = 0{|fn|
fsz = File.size(fn)
files << {'filename'=> fn, 'offset'=> offset, 'length'=> fsz}
offset += fsz
puts files.to_json
STDOUT.write until f.eof?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment