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.
660 661 662 663 |
# File 'lib/httpclient/session.rb', line 660 def initialize @inflater = Zlib::Inflate.new(Zlib::MAX_WBITS) @first = true end |
Instance Method Details
#inflate(body) ⇒ Object
665 666 667 668 669 670 671 |
# File 'lib/httpclient/session.rb', line 665 def inflate(body) if @first first_inflate(body) else @inflater.inflate(body) end end |