code: func (gdw *NaiveDiffDriver) ApplyDiff(id, parent string, diff io.Reader) (size int64, err error) {
  	driver := gdw.ProtoDriver
  
  	// Mount the root filesystem so we can apply the diff/layer.
  	layerRootFs, err := driver.Get(id, "")
  	if err != nil {
  		return
  	}
  	defer driver.Put(id)
  
  	layerFs := layerRootFs.Path()
  	options := &archive.TarOptions{UIDMaps: gdw.uidMaps,
  		GIDMaps: gdw.gidMaps}
  	start := time.Now().UTC()
  	logrus.WithField("id", id).Debug("Start untar layer")
  	if size, err = ApplyUncompressedLayer(layerFs, diff, options); err != nil {
  		return
  	}
  	logrus.WithField("id", id).Debugf("Untar time: %vs", time.Now().UTC().Sub(start).Seconds())
  
  	return
  }
docs: // ApplyDiff extracts the changeset from the given diff into the
  // layer with the specified id and parent, returning the size of the
  // new layer in bytes.