code: public static RandomAccessFastaIndex index(Path file, boolean save, LongProcessReporter reporter) {
          try {
              // This calculates indexStep so the final index size will not exceed 1Mb
              // (approximately)
              long size = Files.size(file);
              long step = size / 131072;
              if (step < 128)
                  step = 128;
              int iStep = 1 << (64 - numberOfLeadingZeros(step) + (bitCount(step) > 1 ? 1 : 0));
  
              // Index file
              return index(file, iStep, save, reporter);
          } catch (IOException e) {
              throw new RuntimeException(e);
          }
      }
docs: Index fasta file with automatic step selection or load previously created index
  
  @param file     file to index
  @param save     whether to save index to {input_file_name}.mifdx file
  @param reporter indexing reporter
  @return index