code: func Extract(r io.Reader, dir string) error {
  	tarball := tar.NewReader(r)
  
  	for {
  		header, err := tarball.Next()
  		if err == io.EOF {
  			break
  		} else if err != nil {
  			return trace.Wrap(err)
  		}
  
  		if err := extractFile(tarball, header, dir); err != nil {
  			return trace.Wrap(err)
  		}
  	}
  	return nil
  }
docs: // Extract extracts the contents of the specified tarball under dir.
  // The resulting files and directories are created using the current user context.