def _process_header(self, file_to_read, read_buffer):
    header_lines = []
    position = (self._skip_lines(file_to_read, read_buffer, self._skip_header_lines) if self._skip_header_lines else 0)
    if self._header_matcher:
        while True:
            (record, num_bytes_to_next_record) = self._read_record(file_to_read, read_buffer)
            decoded_line = self._coder.decode(record)
            if (not self._header_matcher(decoded_line)):
                file_to_read.seek(position)
                read_buffer.reset()
                break
            header_lines.append(decoded_line)
            if (num_bytes_to_next_record < 0):
                break
            position += num_bytes_to_next_record
        if self._header_processor:
            self._header_processor(header_lines)
    return position
def _process_header(self, file_to_read, read_buffer):
    header_lines = []
    position = (self._skip_lines(file_to_read, read_buffer, self._skip_header_lines) if self._skip_header_lines else 0)
    if self._header_matcher:
        while True:
            (record, num_bytes_to_next_record) = self._read_record(file_to_read, read_buffer)
            decoded_line = self._coder.decode(record)
            if (not self._header_matcher(decoded_line)):
                file_to_read.seek(position)
                read_buffer.reset()
                break
            header_lines.append(decoded_line)
            if (num_bytes_to_next_record < 0):
                break
            position += num_bytes_to_next_record
        if self._header_processor:
            self._header_processor(header_lines)
    return position