anchor.diff:                               collecting (vector (aref (descriptor-huff-ac image) ta)
                                                   (aref (descriptor-huff-dc image) td))))
           do (loop for comp fixnum from 0 below ncomp
  -	      with zzbuf = (2d-sint16-array
  -			    '(0  0  0  0  0  0  0  0)
  -			    '(0  0  0  0  0  0  0  0)
  -			    '(0  0  0  0  0  0  0  0)
  -			    '(0  0  0  0  0  0  0  0)
  -			    '(0  0  0  0  0  0  0  0)
  -			    '(0  0  0  0  0  0  0  0)
  -			    '(0  0  0  0  0  0  0  0)
  -			    '(0  0  0  0  0  0  0  0))
                    for pos fixnum =
                       (position (the fixnum (first (aref (scan-cdesc scan) comp)))
                                 (descriptor-cid image)) ; an offset for byte positioning
  
positive.code: 
  ;;; Scan decoding subroutine
  (defun decode-scan (image i s)
    (let ((scan (aref (descriptor-scans image) i)))
      (read-byte s) ; length
      (read-byte s)
      (loop with ncomp fixnum = (setf (scan-ncomp scan) (read-byte s))
  
negative.code:                               (setf (aref buffer dpos) val))))))))
  
  ;;; Reads and decodes either whole scan or restart interval
  (defun decode-chunk (image scan s zzbuf)
    "Reads and decodes either a whole scan (if no restarts) or restart interval"
    (let* ((nextbit (make-nextbit 0 0))
           (ncomp (scan-ncomp scan))
  