Class: HTTPClient::Session::LenientInflater
- Inherits:
-
Object
- Object
- HTTPClient::Session::LenientInflater
- Defined in:
- lib/httpclient/session.rb
Overview
This inflater allows deflate compression with/without zlib header
Instance Method Summary collapse
- #inflate(body) ⇒ Object
-
#initialize ⇒ LenientInflater
constructor
A new instance of LenientInflater.
Constructor Details
#initialize ⇒ LenientInflater
Returns a new instance of LenientInflater.
673 674 675 676 |
# File 'lib/httpclient/session.rb', line 673 def initialize @inflater = Zlib::Inflate.new(Zlib::MAX_WBITS) @first = true end |
Instance Method Details
#inflate(body) ⇒ Object
678 679 680 681 682 683 684 |
# File 'lib/httpclient/session.rb', line 678 def inflate(body) if @first first_inflate(body) else @inflater.inflate(body) end end |