anchor.diff:            (incf j))))
   
   ;;; Loads huffman tables
  -(defun read-dht (image s)
  +(defun read-dht (image)
     "Loads huffman tables on specified destinations"
  -  (let ((len (minus (read-word s) 2))
  +  (let ((len (minus (read-word image) 2))
           (count 0))
  -    (loop for tcth fixnum = (read-byte s)
  +    (loop for tcth fixnum = (read-jpeg-byte image)
             for tc fixnum = (ash tcth -4)
             for th fixnum = (logand tcth 15)
             for tables = (if (zerop tc)
  
positive.code:              (setf (scan-x scan) 0))))))
  
  ;;; Scan decoding subroutine
  (defun decode-scan (image i s)
    (let ((scan (aref (descriptor-scans image) i))
  	(zzbuf (2d-sint16-array
  			    '(0  0  0  0  0  0  0  0)
  
negative.code:           for bits = (huffstruct-bits tables)
            for sum fixnum = 0 do
            (loop for i fixnum from 0 to 15
                  for entry fixnum = (read-jpeg-byte image) do
                  (incf sum entry)
                  (setf (aref bits i) entry))
            (setf (huffstruct-huffval tables)
                  (make-array sum :element-type 'uint8
  			    :initial-contents (loop for i fixnum from 0 below sum
                                                          collecting (read-jpeg-byte image))))
            (incf count (plus sum 17))
  	 (multiple-value-bind (maxcode mincode valptr)
                (build-decoder-tables bits (setf (huffstruct-huffcode tables)
                                                 (build-universal-tables bits)))
              ;;(declare (type uint8-array mincode valptr))
              (setf (huffstruct-maxcode tables) maxcode)
              (setf (huffstruct-mincode tables) mincode)
  