def seek_contiguous_min(needle, step_lines = 10)

      file = @file
      min  = nil

      # move to head of line
      seek_line_head

      loop do

        lines     = backward_lines(step_lines)
        lines_pos = str_byte_index(lines, needle)
        file_pos  = file.pos

        # for debug
        # p [
        #       lines: lines,
        #   lines_pos: lines_pos,
        #    file_pos: file_pos
        #   ].to_s
        # sleep 0.05

        if lines_pos.nil?
          break
        else

          min  = file_pos + lines_pos

          # if not first line, add 1 to result
          min += 1 if file_pos > 0

          break if lines_pos > 0 || file_pos < 1
        end
      end

      file.seek(min) unless min.nil?
      min
    end
def seek_contiguous_min(needle, step_lines = 10)

      file = @file
      min  = nil

      # move to head of line
      seek_line_head

      loop do

        lines     = backward_lines(step_lines)
        lines_pos = str_byte_index(lines, needle)
        file_pos  = file.pos

        # for debug
        # p [
        #       lines: lines,
        #   lines_pos: lines_pos,
        #    file_pos: file_pos
        #   ].to_s
        # sleep 0.05

        if lines_pos.nil?
          break
        else

          min  = file_pos + lines_pos

          # if not first line, add 1 to result
          min += 1 if file_pos > 0

          break if lines_pos > 0 || file_pos < 1
        end
      end

      file.seek(min) unless min.nil?
      min
    end
scan min file#pos of contiguous.
 before set to be within contiguous range.

 args
   needle     ... RegExp or String object for contiguous check
   step_lines ... number of lines for #backward_lines

 returner
   Integer object for file#pos
   EOS of matched line