def delete_unmarked_entries
      deleted_ids = []
      # First remove the entry from the hash table.
      @entries_by_id.delete_if do |id, e|
        if e[MARKED] == 0
          deleted_ids << id
          true
        else
          false
        end
      end
      # Then delete the entry itself.
      @entries.delete_if { |e| e[MARKED] == 0 }
      write_index

      deleted_ids
    end
def delete_unmarked_entries
      deleted_ids = []
      # First remove the entry from the hash table.
      @entries_by_id.delete_if do |id, e|
        if e[MARKED] == 0
          deleted_ids << id
          true
        else
          false
        end
      end
      # Then delete the entry itself.
      @entries.delete_if { |e| e[MARKED] == 0 }
      write_index

      deleted_ids
    end
Remove all entries from the index that have not been marked.
 @return [Array] List of deleted object IDs.