オブジェクトのマーシャリングをするときに圧縮してしまえ、という話題です。 require 'pathname' require 'zlib' a = Array.new a[0], a[1000] = "Hello", "Rubyco" p a[0] #=> "Hello" p a[1000] #=> "Rubyco" Zlib::GzipWriter.open('rubyco.gz') do |f| f.write(Marshal.dump(a)) end p Pathname.new("rubyco.gz").size #=> 49 b = nil Zlib::GzipReader.open('rubyco.gz') do |f| b = Marshal.load(f.read) end p b[0] #=> "Hello" p b[1000] #=> "Rubyco"(このエントリは