code: func (a *Driver) ApplyDiff(id, parent string, diff io.Reader) (size int64, err error) {
  	if !a.isParent(id, parent) {
  		return a.naiveDiff.ApplyDiff(id, parent, diff)
  	}
  
  	// AUFS doesn't need the parent id to apply the diff if it is the direct parent.
  	if err = a.applyDiff(id, diff); err != nil {
  		return
  	}
  
  	return a.DiffSize(id, parent)
  }
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.