Class: HTTP::Response::Inflater
- Inherits:
-
Object
- Object
- HTTP::Response::Inflater
- Defined in:
- lib/http/response/inflater.rb
Instance Method Summary collapse
-
#initialize(connection) ⇒ Inflater
constructor
A new instance of Inflater.
- #readpartial(*args) ⇒ Object
Constructor Details
#initialize(connection) ⇒ Inflater
Returns a new instance of Inflater.
8 9 10 |
# File 'lib/http/response/inflater.rb', line 8 def initialize(connection) @connection = connection end |
Instance Method Details
#readpartial(*args) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/http/response/inflater.rb', line 12 def readpartial(*args) chunk = @connection.readpartial(*args) if chunk chunk = zstream.inflate(chunk) elsif !zstream.closed? zstream.finish zstream.close end chunk end |