code: func archive(ctx context.Context, client *isolatedclient.Client, opts *isolate.ArchiveOptions, dumpJSON string, concurrentChecks, concurrentUploads int, al archiveLogger) error {
  	// Parse the incoming isolate file.
  	deps, rootDir, isol, err := isolate.ProcessIsolate(opts)
  	if err != nil {
  		return fmt.Errorf("isolate %s: failed to process: %v", opts.Isolate, err)
  	}
  	log.Printf("Isolate %s referenced %d deps", opts.Isolate, len(deps))
  
  	// Set up a checker and uploader.
  	checker := archiver.NewChecker(ctx, client, concurrentChecks)
  	uploader := archiver.NewUploader(ctx, client, concurrentUploads)
  	archiver := archiver.NewTarringArchiver(checker, uploader)
  
  	isolSummary, err := archiver.Archive(deps, rootDir, isol, opts.Blacklist, opts.Isolated)
  	if err != nil {
  		return fmt.Errorf("isolate %s: %v", opts.Isolate, err)
  	}
  
  	// Make sure that all pending items have been checked.
  	if err := checker.Close(); err != nil {
  		return err
  	}
  
  	// Make sure that all the uploads have completed successfully.
  	if err := uploader.Close(); err != nil {
  		return err
  	}
  
  	printSummary(al, isolSummary)
  	if err := dumpSummaryJSON(dumpJSON, isolSummary); err != nil {
  		return err
  	}
  
  	al.LogSummary(ctx, int64(checker.Hit.Count()), int64(checker.Miss.Count()), units.Size(checker.Hit.Bytes()), units.Size(checker.Miss.Bytes()), []string{string(isolSummary.Digest)})
  	return nil
  }
docs: // archive performs the archive operation for an isolate specified by opts.
  // dumpJSON is the path to write a JSON summary of the uploaded isolate, in the same format as batch_archive.