Read from an IO stream that can be compressed.
Read from an IO stream that can be compressed
24 25 26 27 28 29 30 31
# File 'lib/as-extensions/ext-logic/io.rb', line 24 def to_string(io, gzipped=false) if gzipped ASE::need 'zlib' Zlib::GzipReader.new(io).read else io.read end end