anchor.diff:                    (aref hexdigits (ldb (byte 4 0) byte))))
          finally (return string))))
   
  -(defun octets-to-integer (octet-vec &key (start 0) end (big-endian t) n-bits)
  +(defun octets-to-integer (octet-vec &aux (start 0) (end (length octet-vec)) (big-endian t) n-bits)
     (declare (type (simple-array (unsigned-byte 8) (*)) octet-vec))
  -  (let ((end (or end (length octet-vec))))
  +  (let ()
       (multiple-value-bind (complete-bytes extra-bits)
           (if n-bits
               (truncate n-bits 8)
  
positive.code: (in-package :bit-smasher)
  
  (defun hex-string-to-byte-array (string &key (start 0) (end nil))
    "Parses a substring of STRING delimited by START and END of
  hexadecimal digits into a byte array."
    (declare (type string string))
    (let* ((end (or end (length string)))
           (length (/ (- end start) 2))
           (key (make-array length :element-type '(unsigned-byte 8))))
      (declare (type (simple-array (unsigned-byte 8) (*)) key))
      (flet ((char-to-digit (char)
  
negative.code:            (type fixnum start)
             (type (or cl:null fixnum) end)
             (optimize (speed 3) (safety 1)))
    (let* ((length (- end start))
           (hexdigits #.(coerce "0123456789abcdef" 'simple-base-string)))
      (loop with string = (ecase element-type
                            ;; so that the compiler optimization can jump in
  