Class: Zlib::GzipReader

Inherits:
Object
  • Object
show all
Defined in:
lib/td/client/compat_gzip_reader.rb

Instance Method Summary collapse

Instance Method Details

#readpartial(size, out = nil) ⇒ String

Parameters:

  • size (Fixnum)
  • out (IO) (defaults to: nil)

Returns:

  • (String)

Raises:

  • (EOFError)


8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/td/client/compat_gzip_reader.rb', line 8

def readpartial(size, out=nil)
  o = read(size)
  if o
    if out
      out.replace(o)
      return out
    else
      return o
    end
  end
  raise EOFError, "end of file reached"
end