ImmutableBlob

Native
1.3
@DeprecatedSinceKotlin("1.9") class ImmutableBlob
(source)
Deprecated: Use ByteArray instead.

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

Returns stable C pointer to data at certain offset, useful as a way to pass resource to C APIs.

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

toByteArray

Copies the data from this blob into a new ByteArray.

fun ImmutableBlob.toByteArray(
    startIndex: Int = 0,
    endIndex: Int = size
): ByteArray
Native
1.3

toUByteArray

Copies the data from this blob into a new UByteArray.

fun ImmutableBlob.toUByteArray(
    startIndex: Int = 0,
    endIndex: Int = size
): UByteArray