code: func (d *Driver) exportLayer(id string, parentLayerPaths []string) (io.ReadCloser, error) {
  	archive, w := io.Pipe()
  	go func() {
  		err := winio.RunWithPrivilege(winio.SeBackupPrivilege, func() error {
  			r, err := hcsshim.NewLayerReader(d.info, id, parentLayerPaths)
  			if err != nil {
  				return err
  			}
  
  			err = writeTarFromLayer(r, w)
  			cerr := r.Close()
  			if err == nil {
  				err = cerr
  			}
  			return err
  		})
  		w.CloseWithError(err)
  	}()
  
  	return archive, nil
  }
docs: // exportLayer generates an archive from a layer based on the given ID.