bytes API Documentation
bytes
Macros around READ-WRITE, WRITE-BYTE and LDB to ease reading and writing multibyte binary strings.
read-bytes (Macro)
Syntax:
— Macro: read-bytes stream length
→ value
Arguments and Values:
stream—a binary input stream.
length—an (integer 0 *)
denoting the number of octets to be read.
value—an (unsigned-byte
n)
where n is (* 8
length)
.
Description:
read-bytes
reads length octets from stream and returns their little-endian unsigned value. Length is evaluated during macro-expansion.
write-bytes (Macro)
Syntax:
— Macro: write-bytes integer length stream
Arguments and Values:
integer—an (unsigned-byte
n)
where n is (* 8
length)
.
length—an (integer 0 *)
denoting the number of octets to be written.
stream—a binary output stream.
Description:
write-bytes
writes integer to stream, represented as length octets in little-endian order. Length is evaluated during macro-expansion.