Module: Datasets::TarGzReadable

Included in:
CIFAR, LivedoorNews, WikipediaKyotoJapaneseEnglish
Defined in:
lib/datasets/tar-gz-readable.rb

Instance Method Summary collapse

Instance Method Details

#open_tar_gz(data_path) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/datasets/tar-gz-readable.rb', line 6

def open_tar_gz(data_path)
  Zlib::GzipReader.open(data_path) do |f|
    Gem::Package::TarReader.new(f) do |tar|
      yield(tar)
    end
  end
end