Public Class methods
new(bytesize)
[show source]
# File lib/httpx/transcoder/gzip.rb 43 def initialize(bytesize) 44 @inflater = Zlib::Inflate.new(Zlib::MAX_WBITS + 32) 45 @bytesize = bytesize 46 end
Public Instance methods
call(chunk)
[show source]
# File lib/httpx/transcoder/gzip.rb 48 def call(chunk) 49 buffer = @inflater.inflate(chunk) 50 @bytesize -= chunk.bytesize 51 if @bytesize <= 0 52 buffer << @inflater.finish 53 @inflater.close 54 end 55 buffer 56 end