anchor.diff:  (defun encode-uint64-carefully (buffer index limit v)
     "Encode V, an unsigned 64-bit integer, into BUFFER at INDEX, taking care
   to never write past position LIMIT.  If writing past LIMIT is required to
  -encode V, then raise ENCODE-OVERFLOW."
  +encode V, then raise BUFFER-OVERFLOW."
     (declare (type octet-vector buffer)
              (type vector-index index limit)
              (type uint64 v))
     (loop do (let ((bits (ldb (byte 8 0) v)))
                (setf v (ash v -7))
  -             (when (>= index limit)
  -               (error 'buffer-overflow))
  -             (setf (aref buffer index)
  -                   (logior bits (if (not (zerop v)) 128 0)))
  +             (when (>= index limit) (error 'buffer-overflow))
  +             (setf (aref buffer index) (logior bits (if (not (zerop v)) 128 0)))
                (incf index))
  -        while (not (zerop v)))
  +        until (zerop v))
     index)
   
   (declaim (ftype (function (octet-vector vector-index) (values uint32 vector-index &optional))
  
positive.code:            (type uint64 v))
    (loop do (let ((bits (ldb (byte 8 0) v)))
               (setf v (ash v -7))
               (setf (aref buffer index)
                     (logior bits (if (not (zerop v)) 128 0)))
               (incf index))
          while (not (zerop v)))
    index)
  
  (declaim (ftype (function (octet-vector vector-index vector-index uint64)
  
negative.code:            (type vector-index index limit))
    (multiple-value-bind (result new-index)
        (parse-uint64-carefully buffer index limit)
      (when (logbitp 63 result)           ; sign bit set, so value is negative
        (decf result (ash 1 64)))
      (values result new-index)))
  
  