(allocate-lsb-byte-buffer)
(allocate-lsb-byte-buffer size)
Creates a new little-endian byte buffer with given capacity.
Creates a new little-endian byte buffer with given capacity.
(allocate-msb-byte-buffer)
(allocate-msb-byte-buffer size)
Creates a new big-endian byte buffer with given capacity.
Creates a new big-endian byte buffer with given capacity.
(make-lsb-byte-buffer data)
Creates a new little-endian byte buffer wrapping given data.
Creates a new little-endian byte buffer wrapping given data.
(make-msb-byte-buffer data)
Creates a new big-endian byte buffer wrapping given data.
Creates a new big-endian byte buffer wrapping given data.
(read-bytes bb length)
(read-bytes bb buffer offset length)
Reads 'length' bytes to buffer starting from offset bytes. Returns a new byte-array if called without buffer.
Reads 'length' bytes to buffer starting from offset bytes. Returns a new byte-array if called without buffer.
(read-ints bb length)
(read-ints bb buffer offset length)
Reads 'length' ints to buffer starting from offset ints. Returns a new int-array if called without buffer.
Reads 'length' ints to buffer starting from offset ints. Returns a new int-array if called without buffer.
(read-null-terminated-string bb)
Reads until next null character. Returns a String without the null.
Reads until next null character. Returns a String without the null.
(read-string bb length)
Reads 'length' bytes. Returns a String.
Reads 'length' bytes. Returns a String.
(read-ubyte bb)
Reads 1 byte. Returns an unsigned byte value as long.
Reads 1 byte. Returns an unsigned byte value as long.
(read-uint bb)
Reads 4 bytes. Returns an unsigned int value as long.
Reads 4 bytes. Returns an unsigned int value as long.
(read-ushort bb)
Reads 2 bytes. Returns an unsigned short value as long.
Reads 2 bytes. Returns an unsigned short value as long.
(skip bb length)
Skips over 'length' bytes of data, discarding the skipped bytes.
Skips over 'length' bytes of data, discarding the skipped bytes.
(write-string bb s)
Writes a string as a sequence of ascii characters.
Writes a string as a sequence of ascii characters.
(write-uint bb n)
Writes a 4-byte unsigned integer value.
Writes a 4-byte unsigned integer value.
(write-ushort bb n)
Writes a 2-byte unsigned short value.
Writes a 2-byte unsigned short value.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close