def encoded_bytes(resource_type)
      @events.select {|e|
        e.is_a?(ResponseReceived) && e.resource_type == resource_type
      }.map { |e|
        e.request_id
      }.map { |request_id|
        data_received_for_request(request_id)
      }.flatten.inject(0) { |bytes_sum, n| bytes_sum + n.encoded_data_length }
    end
def encoded_bytes(resource_type)
      @events.select {|e|
        e.is_a?(ResponseReceived) && e.resource_type == resource_type
      }.map { |e|
        e.request_id
      }.map { |request_id|
        data_received_for_request(request_id)
      }.flatten.inject(0) { |bytes_sum, n| bytes_sum + n.encoded_data_length }
    end
The number of bytes downloaded for a particular resource type. If the
 resource was gzipped during transfer then the gzipped size is reported.

 The HTTP headers for the response are included in the byte count.

 Possible resource types: 'Document','Script', 'Image', 'Stylesheet',
 'Other'.