ImmutableBlob
class ImmutableBlob
An immutable compile-time array of bytes.
Properties
size
val size: Int
Functions
get
operator fun get(index: Int): Byte
iterator
Creates an iterator over the elements of the array.
operator fun iterator(): ByteIterator
Extension Functions
asCPointer
Returns stable C pointer to data at certain offset, useful as a way to pass resource to C APIs.
fun ImmutableBlob.asCPointer(
offset: Int = 0
): CPointer<ByteVar>
asUCPointer
fun ImmutableBlob.asUCPointer(
offset: Int = 0
): CPointer<UByteVar>
toByteArray
Copies the data from this blob into a new ByteArray.
fun ImmutableBlob.toByteArray(
startIndex: Int = 0,
endIndex: Int = size
): ByteArray
toUByteArray
Copies the data from this blob into a new UByteArray.
fun ImmutableBlob.toUByteArray(
startIndex: Int = 0,
endIndex: Int = size
): UByteArray