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) ⇒ Object

Raises:

  • (EOFError)


5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/td/client/compat_gzip_reader.rb', line 5

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