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

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

This page is part of the web mail archives of SRFI 66 from before July 7th, 2015. The new archives for SRFI 66 contain all messages, not just those from before July 7th, 2015.



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