ImmutableBlob

Native
1.3
class ImmutableBlob

An immutable compile-time array of bytes.

Properties

Native
1.3

size

val size: Int

Functions

Native
1.3

get

operator fun get(index: Int): Byte
Native
1.3

iterator

Creates an iterator over the elements of the array.

operator fun iterator(): ByteIterator

Extension Functions

Native
1.3

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>
Native
1.3

asUCPointer

fun ImmutableBlob.asUCPointer(
    offset: Int = 0
): CPointer<UByteVar>
Native
1.3

toByteArray

Allocates new ByteArray and copies the data from blob starting from start and with count amount of bytes.

fun ImmutableBlob.toByteArray(
    start: Int = 0,
    count: Int = size
): ByteArray
Native
1.3

toUByteArray

Allocates new UByteArray and copies the data from blob starting from start and with count amount of bytes.

fun ImmutableBlob.toUByteArray(
    start: Int = 0,
    count: Int = size
): UByteArray