[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[srfi-66] List of bytes to byte-vector

I miss the following operation:

  bytes->byte-vector : (list byte) -> byte-vector
    Return a newly allocated byte-vector whose elements
    are the same as the elements of the list

The function bytes->byte-vector could be defined as

  (define (bytes->byte-vector bytes)
     (apply byte-vector bytes))

but since apply copies the elements of bytes, this would
be inefficient.

Jens Axel Søgaard