Companion
Properties
Extensions
Link copied to clipboard
fun Memory.Companion.of(array: ByteArray, offset: Int = 0, length: Int = array.size - offset): Memory
fun Memory.Companion.of(buffer: ArrayBuffer, offset: Int = 0, length: Int = buffer.byteLength - offset): Memory
Create Memory view for the specified buffer range starting at offset and the specified bytes length.
fun Memory.Companion.of(view: ArrayBufferView, offset: Int = 0, length: Int = view.byteLength): Memory
inline fun Memory.Companion.of(array: ByteArray, offset: Int = 0, length: Int = array.size - offset): Memory
Create Memory view for the specified buffer range starting at ByteBuffer.position and ending at ByteBuffer.limit. Changing the original buffer's position/limit will not affect previously created Memory instances.