code: func (c *compaction) newIterator() iterator.Iterator {
  	// Creates iterator slice.
  	icap := len(c.levels)
  	if c.sourceLevel == 0 {
  		// Special case for level-0.
  		icap = len(c.levels[0]) + 1
  	}
  	its := make([]iterator.Iterator, 0, icap)
  
  	// Options.
  	ro := &opt.ReadOptions{
  		DontFillCache: true,
  		Strict:        opt.StrictOverride,
  	}
  	strict := c.s.o.GetStrict(opt.StrictCompaction)
  	if strict {
  		ro.Strict |= opt.StrictReader
  	}
  
  	for i, tables := range c.levels {
  		if len(tables) == 0 {
  			continue
  		}
  
  		// Level-0 is not sorted and may overlaps each other.
  		if c.sourceLevel+i == 0 {
  			for _, t := range tables {
  				its = append(its, c.s.tops.newIterator(t, nil, ro))
  			}
  		} else {
  			it := iterator.NewIndexedIterator(tables.newIndexIterator(c.s.tops, c.s.icmp, nil, ro), strict)
  			its = append(its, it)
  		}
  	}
  
  	return iterator.NewMergedIterator(its, c.s.icmp, strict)
  }
docs: // Creates an iterator.