Module (chicken bytevector)
This module contains procedures for dealing with "bytevectors", fixed-size sequences of unsigned 8-bit integers.
bytevector
[procedure] (bytevector FIXNUM ...)Returns a new bytevector containing the values FIXNUM ....
make-bytevector
[procedure] (make-bytevector SIZE)Returns a bytevector object of SIZE bytes, aligned on an 8-byte boundary, uninitialized.
bytevector?
[procedure] (bytevector? X)Returns #t if X is a bytevector object, or #f otherwise.
bytevector-length
[procedure] (bytevector-length BYTEVECTOR)Returns the number of bytes in BYTEVECTOR.
bytevector-u8-ref
[procedure] (bytevector-u8-ref BYTEVECTOR INDEX)Returns the byte at INDEX in BYTEVECTOR.
bytevector-u8-set!
[procedure] (bytevector-u8-set! BYTEVECTOR INDEX VALUE)Destructively modifies the byte at INDEX in BYTEVECTOR to VALUE, which should be a fixnum.
utf8->string
[procedure] (utf8->string BYTEVECTOR [VALIDATE])Returns a string with the contents of BYTEVECTOR. if VALIDATE is given and false, then invalidly encoded characters do not signal an error - byte-sequences that are not representing valid UTF-8 characters are retained and, if extracted with string-ref are converted to a trailing surrogate pair half in the range U+DC80 to U+DCFF.
string->utf8
[procedure] (string->utf8 STRING)Returns a bytevector with the contents of STRING.
latin1->string
[procedure] (latin1->string BYTEVECTOR)Returns a string with the contents of BYTEVECTOR converted from Latin-1 (ISO-8859-1) encoding to UTF-8.
string->latin1
[procedure] (string->latin1 STRING)Returns a bytevector with the contents of STRING encoded as Latin-1 (ISO-?8859-1).
bytevector=?
[procedure] (bytevector=? BYTEVECTOR1 BYTEVECTOR2)Returns #t if the two argument bytevectors are of the same size and have the same content.
bytevector-append
[procedure] (bytevector-append BYTEVECTOR ...)Returns a new bytevector holding the concatenated contents of all argument bytevectors.
bytevector-copy
[procedure] (bytevector-copy BYTEVECTOR #!optional START END)Returns a new bytevector holding the contents of BYTEVECTOR between the indices START to END.
bytevector-copy!
[procedure] (bytevector-copy! TO AT FROM #!optional START END)Copioes the contents of the bytevector FROM between the indices START to END into the bytevector TO, starting at index AT.
Previous: Module (chicken bitwise)