Extensible Streams
******************

SBCL supports various extensions of ANSI Common Lisp streams.

Bivalent Streams
     A type of stream that can read and write both character and (unsigned-byte 8) values.

Gray Streams
     User-overloadable CLOS classes whose instances can be used as Lisp streams (e.g. passed as the first argument to format).

Simple Streams
     The bundled contrib module sb-simple-streams implements a subset of the Franz Allegro simple-streams proposal.

Bivalent Streams
================

A bivalent stream can be used to read and write both character and (unsigned-byte 8) values.  A bivalent stream is created by calling open with the argument :element-type :default.  On such a stream, both binary and character data can be read and written with the usual input and output functions.

     Streams are not created bivalent by default for performance reasons.  Bivalent streams are incompatible with fast-read-char, an internal optimization in sbcl's stream machinery that bulk-converts octets to characters and implements a fast path through read-char.

Gray Streams
============

     [file class-sb-gray-fundamental-stream.texinfo not included]
     [file fun-sb-gray-stream-advance-to-column.texinfo not included]
     [file fun-sb-gray-stream-clear-input.texinfo not included]
     [file fun-sb-gray-stream-clear-output.texinfo not included]
     [file fun-sb-gray-stream-finish-output.texinfo not included]
     [file fun-sb-gray-stream-force-output.texinfo not included]
     [file fun-sb-gray-stream-fresh-line.texinfo not included]
     [file fun-sb-gray-stream-line-column.texinfo not included]
     [file fun-sb-gray-stream-line-length.texinfo not included]
     [file fun-sb-gray-stream-listen.texinfo not included]
     [file fun-sb-gray-stream-peek-char.texinfo not included]
     [file fun-sb-gray-stream-read-byte.texinfo not included]
     [file fun-sb-gray-stream-read-char-no-hang.texinfo not included]
     [file fun-sb-gray-stream-read-char.texinfo not included]
     [file fun-sb-gray-stream-read-line.texinfo not included]
     [file fun-sb-gray-stream-read-sequence.texinfo not included]
     [file fun-sb-gray-stream-start-line-p.texinfo not included]
     [file fun-sb-gray-stream-terpri.texinfo not included]
     [file fun-sb-gray-stream-unread-char.texinfo not included]
     [file fun-sb-gray-stream-write-byte.texinfo not included]
     [file fun-sb-gray-stream-write-char.texinfo not included]
     [file fun-sb-gray-stream-write-sequence.texinfo not included]
     [file fun-sb-gray-stream-write-string.texinfo not included]

Simple Streams
==============

     [file sb-simple-streams.texinfo not included]