Class: HTTP::Features::AutoDeflate::DeflatedBody
- Inherits:
-
CompressedBody
- Object
- CompressedBody
- HTTP::Features::AutoDeflate::DeflatedBody
- Defined in:
- lib/http/features/auto_deflate.rb
Instance Method Summary collapse
Methods inherited from CompressedBody
Constructor Details
This class inherits a constructor from HTTP::Features::AutoDeflate::CompressedBody
Instance Method Details
#compress ⇒ Object
90 91 92 93 94 95 96 97 98 |
# File 'lib/http/features/auto_deflate.rb', line 90 def compress deflater = Zlib::Deflate.new @body.each { |chunk| yield deflater.deflate(chunk) } yield deflater.finish ensure deflater.close end |