Warning: This is the manual of the legacy Guile 2.2 series. You may want to read the manual of the current stable series instead.
Next: Bytevectors as Floats, Previous: Bytevectors as Integers, Up: Bytevectors [Contents][Index]
Bytevector contents can readily be converted to/from lists of signed or unsigned integers:
(bytevector->sint-list (u8-list->bytevector (make-list 4 255)) (endianness little) 2) ⇒ (-1 -1)
Return a newly allocated list of unsigned 8-bit integers from the contents of bv.
Return a newly allocated bytevector consisting of the unsigned 8-bit integers listed in lst.
Return a list of unsigned integers of size bytes representing the contents of bv, decoded according to endianness.
Return a list of signed integers of size bytes representing the contents of bv, decoded according to endianness.
Return a new bytevector containing the unsigned integers listed in lst and encoded on size bytes according to endianness.
Return a new bytevector containing the signed integers listed in lst and encoded on size bytes according to endianness.