anchor.diff:  
   ;;; Basic tests for correctness.
   
  -(defun make-byte-combiner (n-bytes)
  +(defun make-byte-combiner (n-bytes big-endian-p)
     (let ((count 0)
           (buffer 0))
       #'(lambda (byte)
  -        (setf buffer (logior (ash buffer 8) byte))
  +        (setf buffer
  +              (if big-endian-p
  +                  (logior (ash buffer 8) byte)
  +                  (let ((x (logior (ash byte (* 8 count)) buffer)))
  +                    (if (= count n-bytes)
  +                        (ash x -8)
  +                        x))))
           (unless (= count n-bytes)
             (incf count))
           (cond
  
positive.code: ;;; Big-endian integer ref tests
  
  (rtest:deftest :ub16ref/be
    (ref-test #'nibbles:ub16ref/be 2 nil)
    :ok)
  
  (rtest:deftest :sb16ref/be
    (ref-test #'nibbles:sb16ref/be 2 t)
    :ok)
  
  (rtest:deftest :ub32ref/be
    (ref-test #'nibbles:ub32ref/be 4 nil)
    :ok)
  
  (rtest:deftest :sb32ref/be
    (ref-test #'nibbles:sb32ref/be 4 t)
    :ok)
  
  (rtest:deftest :ub64ref/be
    (ref-test #'nibbles:ub64ref/be 8 nil)
    :ok)
  
  (rtest:deftest :sb64ref/be
    (ref-test #'nibbles:sb64ref/be 8 t)
    :ok)
  
  
negative.code:                         :element-type `(,byte-kind ,n-bits)))
          (i 0 (1+ i))
          (j 0)
          (combiner (make-byte-combiner ref-size big-endian-p)))
        ((>= i total-octets) (values bv ev n-octets))
      (let ((byte (random 256)))
        (multiple-value-bind (aggregate set-p) (funcall combiner byte)
  