anchor.diff:      (setf (vector-stream-vector stream) (make-vector-stream-buffer))))
   
   (defmacro with-output-to-sequence ((var &key (return-as ''vector) (element-type '':default)
  -                                        (external-format '*default-character-encoding*))
  +                                        (external-format '*default-character-encoding*)
  +                                        initial-buffer-size)
                                      &body body)
     "Creates an IN-MEMORY output stream, binds VAR to this stream and then executes the code in BODY.  The stream stores data of type ELEMENT-TYPE \(a subtype of OCTET). The stream is automatically closed on exit from WITH-OUTPUT-TO-SEQUENCE, no matter whether the exit is normal or abnormal. The return value of this macro is a vector \(or a list if AS-LIST is true) containing the octets that were sent to the stream within BODY."
     (multiple-value-bind (body declarations) (parse-body body)
  
positive.code:        (unwind-protect
              (progn
                (setq ,var (make-in-memory-output-stream :element-type ,element-type
                                                         :external-format ,external-format))
                ,@body
                (get-output-stream-sequence ,var :return-as ,return-as))
           (when ,var (close ,var))))))
  
negative.code:   (declare (optimize speed))
    (vector-stream-index stream))
  
  (defun make-vector-stream-buffer (&key (element-type '(unsigned-byte 8)) initial-size)
    "Creates and returns an array which can be used as the underlying vector for a VECTOR-OUTPUT-STREAM."
    (declare (optimize speed)
             (type array-index initial-size))
    (make-array (or initial-size 32)
                :adjustable t
                :fill-pointer 0
                :element-type element-type))
  
  (defmethod get-output-stream-sequence ((stream in-memory-output-stream) &key (return-as 'vector))
    "Returns a vector containing, in order, all the octets that have been output to the IN-MEMORY stream STREAM. This operation clears any octets on STREAM, so the vector contains only those octets which have been output since the last call to GET-OUTPUT-STREAM-SEQUENCE or since the creation of the stream, whichever occurred most recently. If AS-LIST is true the return value is coerced to a list."
  