def decapsulate(*hdrs)
      hdrs.each do |hdr|
        idx = headers.index(hdr)
        raise FormatError, 'header not in packet!' if idx.nil?

        prev_hdr = idx > 0 ? headers[idx - 1] : nil
        next_hdr = (idx + 1) < headers.size ? headers[idx + 1] : nil
        headers.delete_at(idx)
        add_header(next_hdr, previous_header: prev_hdr) if prev_hdr && next_hdr
      end
    rescue ArgumentError => ex
      raise FormatError, ex.message
    end
def decapsulate(*hdrs)
      hdrs.each do |hdr|
        idx = headers.index(hdr)
        raise FormatError, 'header not in packet!' if idx.nil?

        prev_hdr = idx > 0 ? headers[idx - 1] : nil
        next_hdr = (idx + 1) < headers.size ? headers[idx + 1] : nil
        headers.delete_at(idx)
        add_header(next_hdr, previous_header: prev_hdr) if prev_hdr && next_hdr
      end
    rescue ArgumentError => ex
      raise FormatError, ex.message
    end
Remove headers from +self+
 @param [Array<Header>] hdrs
 @return [self] +self+ with some headers removed
 @raise [FormatError] any headers not in +self+
 @raise [FormatError] removed headers result in an unknown binding
 @since 1.1.0