This is a wrapper around Zlib::GzipReader to allow it’s # method to adhere to the IO spec, allowing for two parameters (length, and buffer)
Helper method for one-off parsing from a gzip-compressed stream
See Yajl::Parser#parse for parameter documentation
# File lib/yajl/gzip/stream_reader.rb, line 23 23: def self.parse(input, options={}, buffer_size=nil, &block) 24: if input.is_a?(String) 25: input = StringIO.new(input) 26: end 27: Yajl::Parser.new(options).parse(new(input), buffer_size, &block) 28: end
A helper method to allow use similar to IO#read
# File lib/yajl/gzip/stream_reader.rb, line 8 8: def read(len=nil, buffer=nil) 9: if val = super(len) 10: unless buffer.nil? 11: buffer.replace(val) 12: return buffer 13: end 14: super(len) 15: else 16: nil 17: end 18: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.