Sha256: b03e309b11a5c0c2241de853475defcb2f906387b18150cd5947b086ec3a2a0d
Contents?: true
Size: 576 Bytes
Versions: 23
Compression:
Stored size: 576 Bytes
Contents
# frozen_string_literal: true require "zlib" module HTTP class Response class Inflater attr_reader :connection def initialize(connection) @connection = connection end def readpartial(*args) chunk = @connection.readpartial(*args) if chunk chunk = zstream.inflate(chunk) elsif !zstream.closed? zstream.finish zstream.close end chunk end private def zstream @zstream ||= Zlib::Inflate.new(32 + Zlib::MAX_WBITS) end end end end
Version data entries
23 entries across 23 versions & 1 rubygems