code: func ApplyDelta(target, base plumbing.EncodedObject, delta []byte) error {
  	r, err := base.Reader()
  	if err != nil {
  		return err
  	}
  
  	w, err := target.Writer()
  	if err != nil {
  		return err
  	}
  
  	src, err := ioutil.ReadAll(r)
  	if err != nil {
  		return err
  	}
  
  	dst, err := PatchDelta(src, delta)
  	if err != nil {
  		return err
  	}
  
  	target.SetSize(int64(len(dst)))
  
  	_, err = w.Write(dst)
  	return err
  }
docs: // ApplyDelta writes to target the result of applying the modification deltas in delta to base.