class Protocol::HTTP::Body::ZStream
def close(error = nil)
def close(error = nil) if stream = @stream @stream = nil stream.close unless stream.closed? end super end
def initialize(body, stream)
def initialize(body, stream) super(body) @stream = stream @input_length = 0 @output_length = 0 end
def inspect
def inspect "#{super} | \#<#{self.class} #{(ratio*100).round(2)}%>" end
def length
def length # We don't know the length of the output until after it's been compressed. nil end
def ratio
def ratio if @input_length != 0 @output_length.to_f / @input_length.to_f else 1.0 end end