class Async::HTTP::Body::Inflate

def read

def read
	return if @stream.closed?
	
	if chunk = super
		@input_length += chunk.bytesize
		
		chunk = @stream.inflate(chunk)
		
		@output_length += chunk.bytesize
	else
		chunk = @stream.finish
		
		@output_length += chunk.bytesize
		
		@stream.close
	end
	
	return chunk.empty? ? nil : chunk
end