Skip to content

Instantly share code, notes, and snippets.

View masukomi's full-sized avatar

masukomi (a.k.a. Kay Rhodes) masukomi

View GitHub Profile
@masukomi
masukomi / recursive_zip_example.rb
Last active August 30, 2023 16:21
[ruby] how to recursively process a zip file containing zip files in memory
#!/usr/bin/env ruby
# Note this doesn't deal with directories in zip files.
# That's documented elsewhere. The recursive processing of
# zip files in zip files was the tricky bit.
require 'zip'
def recursive_zip_reader(input)
if input.is_a? String
zip_file = Zip::File.open(input)