code: func (idx *MemoryIndex) EntriesByOffset() (EntryIter, error) {
  	count, err := idx.Count()
  	if err != nil {
  		return nil, err
  	}
  
  	iter := &idxfileEntryOffsetIter{
  		entries: make(entriesByOffset, count),
  	}
  
  	entries, err := idx.Entries()
  	if err != nil {
  		return nil, err
  	}
  
  	for pos := 0; int64(pos) < count; pos++ {
  		entry, err := entries.Next()
  		if err != nil {
  			return nil, err
  		}
  
  		iter.entries[pos] = entry
  	}
  
  	sort.Sort(iter.entries)
  
  	return iter, nil
  }
docs: // EntriesByOffset implements the Index interface.