anchor.diff:                                    for pos fixnum = (position cid (descriptor-cid image))
                                     collecting (list (aref (descriptor-iH image) pos)
                                                      (aref (descriptor-iV image) pos)))))
  -         (preds (make-array ncomp :initial-element 0 :element-type 'sint16)))
  +         (preds (make-array ncomp :initial-element 0 :element-type 'sint16))
  +         (tables (make-array ncomp
  +                     :initial-contents
  +                     (loop for i fixnum from 0 below ncomp
  +                           for ta fixnum = (logand (second (aref (scan-cdesc scan) i)) 15)
  +                           for td fixnum = (ash (the fixnum (second (aref (scan-cdesc scan) i))) -4)
  +                           collecting (vector (aref (descriptor-huff-ac image) ta)
  +                                              (aref (descriptor-huff-dc image) td))))))
       (declare #.*optimize*
                (type fixnum ncomp Hmax Vmax x-growth y-growth nwidth)
  -             (type (simple-array t (*)) freqs fr)
  +             (type (simple-array t (*)) freqs fr tables)
                (dynamic-extent fr freqs))
       (catch 'marker
         (loop
  -        with tables =
  -           (make-array ncomp
  -                       :initial-contents
  -                       (loop for i fixnum from 0 below ncomp
  -                             for ta fixnum = (logand (second (aref (scan-cdesc scan) i)) 15)
  -                             for td fixnum = (ash (the fixnum (second (aref (scan-cdesc scan) i))) -4)
  -                             collecting (vector (aref (descriptor-huff-ac image) ta)
  -                                                (aref (descriptor-huff-dc image) td))))
           do (loop for comp fixnum from 0 below ncomp
                    for pos fixnum =
                       (position (the fixnum (first (aref (scan-cdesc scan) comp)))
  
positive.code: (defun izigzag8 (inbuf zzbuf)
    (declare #.*optimize*
             (type uint8-array inbuf)
  	   (type uint8-2d-array zzbuf))
    "Performs inverse zigzag block arrangement"
    (loop for zrow across +zigzag-index+
          for row across zzbuf do
          (loop for pos fixnum across zrow
                for x fixnum from 0 do
                (setf (aref row x) (aref inbuf pos))))
  
negative.code:   "The DECODE procedure, as described in CCITT rec."
    (let ((i 1)
          (code (funcall nextbit s)))
      (declare #.*optimize*
               (type (simple-array uint8 (*)) huffval)
               (type (simple-array fixnum (*)) maxcode mincode valptr)
               (type fixnum i code))
      (loop while (> code (aref maxcode i)) do
            (incf i)
            (setf code (plus (ash code 1) (funcall nextbit s))))
  