def inflater # :nodoc:
    return yield @socket unless Net::HTTP::HAVE_ZLIB
    return yield @socket unless @decode_content
    return yield @socket if self['content-range']

    case self['content-encoding']
    when 'deflate', 'gzip', 'x-gzip' then
      self.delete 'content-encoding'

      inflate_body_io = Inflater.new(@socket)

      begin
        yield inflate_body_io
      ensure
        inflate_body_io.finish
      end
    when 'none', 'identity' then
      self.delete 'content-encoding'

      yield @socket
    else
      yield @socket
    end
  end
#
Checks for a supported Content-Encoding header and yields an Inflate
wrapper for this response's socket when zlib is present.  If the
Content-Encoding is unsupported or zlib is missing the plain socket is
yielded.

If a Content-Range header is present a plain socket is yielded as the
bytes in the range may not be a complete deflate block.