anchor.diff:  (defmethod #.*stream-element-type-function* ((stream octet-stream))
     '(unsigned-byte 8))
   
  -(defmacro define-stream-read-sequence (specializer &body body)
  +(defmacro define-stream-read-sequence (specializer type &body body)
     #+sbcl
     `(defmethod sb-gray:stream-read-sequence ((stream ,specializer) seq &optional (start 0) end)
  -     (cond
  -       ((not (typep seq 'simple-octet-vector))
  -        (call-next-method))
  -       (t
  -        (let ((end (or end (length seq))))
  -          ,@body))))
  +     (typecase seq
  +       (,type
  +        (let ((end (or end (length seq))))
  +          ,@body))
  +       (t
  +        (call-next-method))))
     #+cmu
     `(defmethod ext:stream-read-sequence ((stream ,specializer) seq &optional (start 0) end)
  -     (cond
  -       ((not (typep seq 'simple-octet-vector))
  -        (call-next-method))
  -       (t
  -        (let ((end (or end (length seq))))
  -          ,@body))))
  +     (typecase seq
  +       (,type
  +        (let ((end (or end (length seq))))
  +          ,@body))
  +       (t
  +        (call-next-method))))
     #+allegro
     `(defmethod excl:stream-read-sequence ((stream ,specializer) seq &optional (start 0) end)
  -     (cond
  -       ((not (typep seq 'simple-octet-vector))
  -        (call-next-method))
  -       (t
  -        (let ((end (or end (length seq))))
  -          ,@body))))
  +     (typecase seq
  +       (,type
  +        (let ((end (or end (length seq))))
  +          ,@body))
  +       (t
  +        (call-next-method))))
     #+openmcl
     `(defmethod ccl:stream-read-vector ((stream ,specializer) seq start end)
  -     (cond
  -       ((not (typep seq 'simple-octet-vector))
  -        (call-next-method))
  -       (t
  -        ,@body)))
  +     (typecase seq
  +       (,type
  +        ,@body)
  +       (t
  +        (call-next-method))))
     #+lispworks
     `(defmethod stream:stream-read-sequence ((stream ,specializer) seq start end)
  -     (cond
  -       ((not (typep seq 'simple-octet-vector))
  -        (call-next-method))
  -       (t
  -        ,@body))))
  -
  -(defmacro define-stream-write-sequence (specializer &body body)
  +     (typecase seq
  +       (,type
  +        ,@body)
  +       (t
  +        (call-next-method)))))
  +
  +(defmacro define-stream-write-sequence (specializer type &body body)
     #+sbcl
     `(defmethod sb-gray:stream-write-sequence ((stream ,specializer) seq &optional (start 0) end)
  -     (cond
  -       ((not (typep seq 'simple-octet-vector))
  -        (call-next-method))
  -       (t
  -        (let ((end (or end (length seq))))
  -          ,@body))))
  +     (typecase seq
  +       (,type
  +        (let ((end (or end (length seq))))
  +          ,@body))
  +       (t
  +        (call-next-method))))
     #+cmu
     `(defmethod ext:stream-write-sequence ((stream ,specializer) seq &optional (start 0) end)
  -     (cond
  -       ((not (typep seq 'simple-octet-vector))
  -        (call-next-method))
  -       (t
  -        (let ((end (or end (length seq))))
  -          ,@body))))
  +     (typecase seq
  +       (,type
  +        (let ((end (or end (length seq))))
  +          ,@body))
  +       (t
  +        (call-next-method))))
     #+allegro
     `(defmethod stream:stream-write-sequence ((stream ,specializer) seq &optional (start 0) end)
  -     (cond
  -       ((not (typep seq 'simple-octet-vector))
  -        (call-next-method))
  -       (t
  -        (let ((end (or end (length seq))))
  -          ,@body))))
  +     (typecase seq
  +       (,type
  +        (let ((end (or end (length seq))))
  +          ,@body))
  +       (t
  +        (call-next-method))))
     #+openmcl
     `(defmethod ccl:stream-write-vector ((stream ,specializer) seq start end)
  -     (cond
  -       ((not (typep seq 'simple-octet-vector))
  -        (call-next-method))
  -       (t
  -        ,@body)))
  +     (typecase seq
  +       (,type
  +        ,@body)
  +       (t
  +        (call-next-method))))
     #+lispworks
     `(defmethod stream:stream-write-sequence ((stream ,specializer) seq start end)
  -     (cond
  -       ((not (typep seq 'simple-octet-vector))
  -        (call-next-method))
  -       (t
  -        ,@body))))
  +     (typecase seq
  +       (,type
  +        ,@body)
  +       (t
  +        (call-next-method)))))
    
   ;;; input streams
  
positive.code:       (setf position 0))
      byte))
  
  (define-stream-write-sequence digesting-stream
    (unless (zerop (stream-buffer-position stream))
      (update-digest (stream-digest stream)
                     (stream-buffer stream)
  
negative.code:        (setf (index stream) (1+ index))
         (aref buffer index)))))
  
  (define-stream-read-sequence octet-input-stream simple-octet-vector
    (let ((buffer (buffer stream))
          (index (index stream))
          (buffer-end (end stream)))
  