Common Lisp Package: SB-VECTOR-IO

README:

FUNCTION

Private

Undocumented

CHECK-STREAM-ELEMENT-TYPE (STREAM CONTEXT)

VECTOR-ELEMENT-BYTES (VECTOR)

WAIT-FOR-VECTOR-WRITE (STREAM FD DATA START BYTES)

GENERIC-FUNCTION

Public

READ-VECTOR-DATA (VECTOR STREAM &KEY START END (START 0))

Destructively modifies VECTOR by replacing elements of the subsequence bounded by START and AND with raw data from STREAM. VECTOR must have ARRAY-ELEMENT-TYPE of DOUBLE-FLOAT, SINGLE-FLOAT, (UNSIGNED-BYTE X), or (SIGNED-BYTE X). Floating point values are read using the IEEE formats, and SIGNED-BYTE and UNSIGNED-BYTE values are read as raw bytes using the native endianness of the host platform. FIXNUMs are read in the implementation internal representation. Primary return value is the number of elements read. If element type of VECTOR is other than (UNSIGNED-BYTE 8) or (SIGNED-BYTE 8), and END-OF-FILE occurs before all the requested elements have been read, the last element read may be incomplete. In such a case the secondary return value is the number of bytes missing from the last element -- NIL if the last element is complete.

WRITE-VECTOR-DATA (VECTOR STREAM &KEY START END (START 0))

Writes elements of the subsequence of VECTOR bounded by START and END to STREAM. VECTOR must have ARRAY-ELEMENT-TYPE of FIXNUM, DOUBLE-FLOAT, SINGLE-FLOAT, (UNSIGNED-BYTE X), or (SIGNED-BYTE X). Floating point values are written using the IEEE formats, and SIGNED-BYTE and UNSIGNED-BYTE values are written as raw bytes using the native endianness of the host platform. FIXNUMs are written in the implementation internal representation. STREAM must be a binary output stream. Returns the number of elements written.

Private

STREAM-FD (STREAM DIRECTION)

Returns the underlying file-descriptor of STREAM in DIRECTION. DIRECTION must be either :INPUT or :OUTPUT.

STREAM-TIMEOUT (STREAM DIRECTION)

Returns the underlying timeout of STREAM in DIRECTION. DIRECTION must be either :INPUT or :OUTPUT.