Package io.ktor.utils.io.bits

Types

Memory
Link copied to clipboard
common
class Memory
Represents a linear range of bytes.
inline class Memory
class Memory

Functions

allocMemory
Link copied to clipboard
posix
fun <ERROR CLASS>.allocMemory(size: Int): Memory
Allocate memory range having the specified size in bytes and provide an instance of Memory view for this range.
fun <ERROR CLASS>.allocMemory(size: Long): Memory
Allocate memory range having the specified size in bytes and provide an instance of Memory view for this range.
copyTo
Link copied to clipboard
fun Memory.copyTo(destination: ByteBuffer, offset: Int)
Copies bytes from this memory range from the specified offset to the destination buffer.
fun Memory.copyTo(destination: ByteBuffer, offset: Long)
Copies bytes from this memory range from the specified offset to the destination buffer.
fun ByteBuffer.copyTo(destination: Memory, offset: Int)
Copy byte from this buffer moving it's position to the destination at offset.
common
fun Memory.copyTo(destination: ByteArray, offset: Int, length: Int)
Copies bytes from this memory range from the specified offset and length to the destination.
common
fun Memory.copyTo(destination: ByteArray, offset: Long, length: Int)
Copies bytes from this memory range from the specified offset and length to the destination.
posix
fun <ERROR CLASS><<ERROR CLASS>>.copyTo(destination: Memory, offset: Int, length: Int, destinationOffset: Int)
Copy length bytes to the destination at the specified destinationOffset from the memory addressed by this pointer with offset in bytes.
posix
fun <ERROR CLASS><<ERROR CLASS>>.copyTo(destination: Memory, offset: Long, length: Long, destinationOffset: Long)
Copy length bytes to the destination at the specified destinationOffset from the memory addressed by this pointer with offset in bytes.
posix
fun Memory.copyTo(destination: <ERROR CLASS><<ERROR CLASS>>, offset: Int, length: Int, destinationOffset: Int)
Copy content bytes to the memory addressed by the destination pointer with the specified destinationOffset in bytes.
posix
fun Memory.copyTo(destination: <ERROR CLASS><<ERROR CLASS>>, offset: Long, length: Long, destinationOffset: Long)
Copy content bytes to the memory addressed by the destination pointer with the specified destinationOffset in bytes.
common
fun Memory.copyTo(destination: ByteArray, offset: Int, length: Int, destinationOffset: Int)
Copies bytes from this memory range from the specified offset and length to the destination at destinationOffset.
fun Memory.copyTo(destination: ByteArray, offset: Int, length: Int, destinationOffset: Int)
Copies bytes from this memory range from the specified offset and length to the destination at destinationOffset.
posix
fun Memory.copyTo(destination: ByteArray, offset: Int, length: Int, destinationOffset: Int)
Copies bytes from this memory range from the specified offset and length to the destination at destinationOffset.
common
fun Memory.copyTo(destination: ByteArray, offset: Long, length: Int, destinationOffset: Int)
Copies bytes from this memory range from the specified offset and length to the destination at destinationOffset.
fun Memory.copyTo(destination: ByteArray, offset: Long, length: Int, destinationOffset: Int)
Copies bytes from this memory range from the specified offset and length to the destination at destinationOffset.
posix
fun Memory.copyTo(destination: ByteArray, offset: Long, length: Int, destinationOffset: Int)
Copies bytes from this memory range from the specified offset and length to the destination at destinationOffset.
fill
Link copied to clipboard
common
fun Memory.fill(offset: Int, count: Int, value: Byte)
Fill memory range starting at the specified offset with value repeated count times.
fun Memory.fill(offset: Int, count: Int, value: Byte)
Fill memory range starting at the specified offset with value repeated count times.
posix
fun Memory.fill(offset: Int, count: Int, value: Byte)
Fill memory range starting at the specified offset with value repeated count times.
common
fun Memory.fill(offset: Long, count: Long, value: Byte)
Fill memory range starting at the specified offset with value repeated count times.
fun Memory.fill(offset: Long, count: Long, value: Byte)
Fill memory range starting at the specified offset with value repeated count times.
posix
fun Memory.fill(offset: Long, count: Long, value: Byte)
Fill memory range starting at the specified offset with value repeated count times.
free
Link copied to clipboard
posix
fun <ERROR CLASS>.free(memory: Memory)
Release resources that the memory instance is holding.
get
Link copied to clipboard
common
inline operator fun Memory.get(index: Int): Byte
Read byte at the specified index.
inline operator fun Memory.get(index: Long): Byte
Read byte at the specified index.
loadByteArray
Link copied to clipboard
common
inline fun Memory.loadByteArray(offset: Int, destination: ByteArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies bytes from this memory range from the specified offset and count to the destination at destinationOffset.
inline fun Memory.loadByteArray(offset: Long, destination: ByteArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies unsigned shorts integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
loadDoubleArray
Link copied to clipboard
common
fun Memory.loadDoubleArray(offset: Int, destination: DoubleArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies floating point numbers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
fun Memory.loadDoubleArray(offset: Int, destination: DoubleArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies floating point numbers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
posix
fun Memory.loadDoubleArray(offset: Int, destination: DoubleArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies floating point numbers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
common
fun Memory.loadDoubleArray(offset: Long, destination: DoubleArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies floating point numbers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
fun Memory.loadDoubleArray(offset: Long, destination: DoubleArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies floating point numbers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
posix
fun Memory.loadDoubleArray(offset: Long, destination: DoubleArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies floating point numbers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
loadDoubleAt
Link copied to clipboard
common
inline fun Memory.loadDoubleAt(offset: Int): Double
Read short signed 64bit floating point number in the network byte order (Big Endian)
inline fun Memory.loadDoubleAt(offset: Int): Double
inline fun Memory.loadDoubleAt(offset: Int): Double
common
inline fun Memory.loadDoubleAt(offset: Long): Double
Read short signed 64bit floating point number in the network byte order (Big Endian)
inline fun Memory.loadDoubleAt(offset: Long): Double
inline fun Memory.loadDoubleAt(offset: Long): Double
loadFloatArray
Link copied to clipboard
common
fun Memory.loadFloatArray(offset: Int, destination: FloatArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies floating point numbers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
fun Memory.loadFloatArray(offset: Int, destination: FloatArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies floating point numbers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
posix
fun Memory.loadFloatArray(offset: Int, destination: FloatArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies floating point numbers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
common
fun Memory.loadFloatArray(offset: Long, destination: FloatArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies floating point numbers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
fun Memory.loadFloatArray(offset: Long, destination: FloatArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies floating point numbers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
posix
fun Memory.loadFloatArray(offset: Long, destination: FloatArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies floating point numbers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
loadFloatAt
Link copied to clipboard
common
inline fun Memory.loadFloatAt(offset: Int): Float
Read short signed 32bit floating point number in the network byte order (Big Endian)
inline fun Memory.loadFloatAt(offset: Int): Float
inline fun Memory.loadFloatAt(offset: Int): Float
common
inline fun Memory.loadFloatAt(offset: Long): Float
Read short signed 32bit floating point number in the network byte order (Big Endian)
inline fun Memory.loadFloatAt(offset: Long): Float
inline fun Memory.loadFloatAt(offset: Long): Float
loadIntArray
Link copied to clipboard
common
fun Memory.loadIntArray(offset: Int, destination: IntArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies regular integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
fun Memory.loadIntArray(offset: Int, destination: IntArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies regular integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
posix
fun Memory.loadIntArray(offset: Int, destination: IntArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies regular integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
common
fun Memory.loadIntArray(offset: Long, destination: IntArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies regular integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
fun Memory.loadIntArray(offset: Long, destination: IntArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies regular integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
posix
fun Memory.loadIntArray(offset: Long, destination: IntArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies regular integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
loadIntAt
Link copied to clipboard
common
inline fun Memory.loadIntAt(offset: Int): Int
Read regular signed 32bit integer in the network byte order (Big Endian)
inline fun Memory.loadIntAt(offset: Int): Int
inline fun Memory.loadIntAt(offset: Int): Int
common
inline fun Memory.loadIntAt(offset: Long): Int
Read regular signed 32bit integer in the network byte order (Big Endian)
inline fun Memory.loadIntAt(offset: Long): Int
inline fun Memory.loadIntAt(offset: Long): Int
loadLongArray
Link copied to clipboard
common
fun Memory.loadLongArray(offset: Int, destination: LongArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies long integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
fun Memory.loadLongArray(offset: Int, destination: LongArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies regular integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
posix
fun Memory.loadLongArray(offset: Int, destination: LongArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies regular integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
common
fun Memory.loadLongArray(offset: Long, destination: LongArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies long integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
fun Memory.loadLongArray(offset: Long, destination: LongArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies regular integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
posix
fun Memory.loadLongArray(offset: Long, destination: LongArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies regular integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
loadLongAt
Link copied to clipboard
common
inline fun Memory.loadLongAt(offset: Int): Long
Read short signed 64bit integer in the network byte order (Big Endian)
inline fun Memory.loadLongAt(offset: Int): Long
inline fun Memory.loadLongAt(offset: Int): Long
common
inline fun Memory.loadLongAt(offset: Long): Long
Read short signed 64bit integer in the network byte order (Big Endian)
inline fun Memory.loadLongAt(offset: Long): Long
inline fun Memory.loadLongAt(offset: Long): Long
loadShortArray
Link copied to clipboard
common
fun Memory.loadShortArray(offset: Int, destination: ShortArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies shorts integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
fun Memory.loadShortArray(offset: Int, destination: ShortArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies shorts integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
posix
fun Memory.loadShortArray(offset: Int, destination: ShortArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies shorts integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
common
fun Memory.loadShortArray(offset: Long, destination: ShortArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies shorts integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
fun Memory.loadShortArray(offset: Long, destination: ShortArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies shorts integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
posix
fun Memory.loadShortArray(offset: Long, destination: ShortArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies shorts integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
loadShortAt
Link copied to clipboard
common
inline fun Memory.loadShortAt(offset: Int): Short
Read short signed 16bit integer in the network byte order (Big Endian)
inline fun Memory.loadShortAt(offset: Int): Short
inline fun Memory.loadShortAt(offset: Int): Short
common
inline fun Memory.loadShortAt(offset: Long): Short
Read short signed 16bit integer in the network byte order (Big Endian)
inline fun Memory.loadShortAt(offset: Long): Short
inline fun Memory.loadShortAt(offset: Long): Short
loadUByteArray
Link copied to clipboard
common
inline fun Memory.loadUByteArray(offset: Int, destination: UByteArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies unsigned shorts integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
inline fun Memory.loadUByteArray(offset: Long, destination: UByteArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies unsigned shorts integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
loadUIntArray
Link copied to clipboard
common
inline fun Memory.loadUIntArray(offset: Int, destination: UIntArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies unsigned integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
inline fun Memory.loadUIntArray(offset: Long, destination: UIntArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies unsigned integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
loadUIntAt
Link copied to clipboard
common
inline fun Memory.loadUIntAt(offset: Int): UInt
Read regular unsigned 32bit integer in the network byte order (Big Endian)
inline fun Memory.loadUIntAt(offset: Long): UInt
Read regular unsigned 32bit integer in the network byte order (Big Endian)
loadULongArray
Link copied to clipboard
common
inline fun Memory.loadULongArray(offset: Int, destination: ULongArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies unsigned long integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
inline fun Memory.loadULongArray(offset: Long, destination: ULongArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies unsigned long integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
loadULongAt
Link copied to clipboard
common
inline fun Memory.loadULongAt(offset: Int): ULong
Read short signed 64bit integer in the network byte order (Big Endian)
inline fun Memory.loadULongAt(offset: Long): ULong
Read short signed 64bit integer in the network byte order (Big Endian)
loadUShortArray
Link copied to clipboard
common
inline fun Memory.loadUShortArray(offset: Int, destination: UShortArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies unsigned shorts integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
inline fun Memory.loadUShortArray(offset: Long, destination: UShortArray, destinationOffset: Int = 0, count: Int = destination.size - destinationOffset)
Copies unsigned shorts integers from this memory range from the specified offset and count to the destination at destinationOffset interpreting numbers in the network order (Big Endian).
loadUShortAt
Link copied to clipboard
common
inline fun Memory.loadUShortAt(offset: Int): UShort
Read short unsigned 16bit integer in the network byte order (Big Endian)
inline fun Memory.loadUShortAt(offset: Long): UShort
Read short unsigned 16bit integer in the network byte order (Big Endian)
of
Link copied to clipboard
inline fun Memory.Companion.of(buffer: ByteBuffer): Memory
Create Memory view for the specified buffer range starting at ByteBuffer.position and ending at ByteBuffer.limit.
posix
inline fun Memory.Companion.of(pointer: <ERROR CLASS><out <ERROR CLASS>>, size: Int): Memory
Create an instance of Memory view for memory region starting at the specified pointer and having the specified size in bytes.
posix
inline fun Memory.Companion.of(pointer: <ERROR CLASS><out <ERROR CLASS>>, size: Long): Memory
Create an instance of Memory view for memory region starting at the specified pointer and having the specified size in bytes.
posix
inline fun Memory.Companion.of(pointer: <ERROR CLASS><out <ERROR CLASS>>, size: <ERROR CLASS>): Memory
Create an instance of Memory view for memory region starting at the specified pointer and having the specified size in bytes.
inline fun Memory.Companion.of(array: ByteArray, offset: Int = 0, length: Int = array.size - offset): Memory
Create Memory view for the specified array range starting at offset and the specified bytes length.
reverseByteOrder
Link copied to clipboard
common
fun Double.reverseByteOrder(): Double
Reverse number's byte order
inline fun Double.reverseByteOrder(): Double
Reverse number's byte order
posix
fun Double.reverseByteOrder(): Double
Reverse number's byte order
common
fun Float.reverseByteOrder(): Float
Reverse number's byte order
inline fun Float.reverseByteOrder(): Float
Reverse number's byte order
posix
fun Float.reverseByteOrder(): Float
Reverse number's byte order
common
fun Int.reverseByteOrder(): Int
Reverse number's byte order
inline fun Int.reverseByteOrder(): Int
Reverse number's byte order
posix
fun Int.reverseByteOrder(): Int
Reverse number's byte order
common
fun Long.reverseByteOrder(): Long
Reverse number's byte order
inline fun Long.reverseByteOrder(): Long
Reverse number's byte order
posix
fun Long.reverseByteOrder(): Long
Reverse number's byte order
common
fun Short.reverseByteOrder(): Short
Reverse number's byte order
inline fun Short.reverseByteOrder(): Short
Reverse number's byte order
posix
fun Short.reverseByteOrder(): Short
Reverse number's byte order
common
fun UInt.reverseByteOrder(): UInt
Reverse number's byte order
common
fun ULong.reverseByteOrder(): ULong
Reverse number's byte order
common
fun UShort.reverseByteOrder(): UShort
Reverse number's byte order
set
Link copied to clipboard
common
inline operator fun Memory.set(index: Int, value: Byte)
Index write operator to write value at the specified index
inline operator fun Memory.set(index: Long, value: Byte)
Index write operator to write value at the specified index
storeAt
Link copied to clipboard
common
inline fun Memory.storeAt(index: Int, value: UByte)
Index write operator to write value at the specified index
inline fun Memory.storeAt(index: Long, value: UByte)
Index write operator to write value at the specified index
storeByteArray
Link copied to clipboard
common
inline fun Memory.storeByteArray(offset: Int, source: ByteArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies unsigned shorts integers from the source array at sourceOffset to this memory at the specified offset.
inline fun Memory.storeByteArray(offset: Long, source: ByteArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies unsigned shorts integers from the source array at sourceOffset to this memory at the specified offset.
storeDoubleArray
Link copied to clipboard
common
fun Memory.storeDoubleArray(offset: Int, source: DoubleArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies floating point numbers from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
fun Memory.storeDoubleArray(offset: Int, source: DoubleArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies floating point numbers from from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
posix
fun Memory.storeDoubleArray(offset: Int, source: DoubleArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies floating point numbers from from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
common
fun Memory.storeDoubleArray(offset: Long, source: DoubleArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies floating point numbers from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
fun Memory.storeDoubleArray(offset: Long, source: DoubleArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies floating point numbers from from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
posix
fun Memory.storeDoubleArray(offset: Long, source: DoubleArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies floating point numbers from from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
storeDoubleAt
Link copied to clipboard
common
inline fun Memory.storeDoubleAt(offset: Int, value: Double)
Write short signed 64bit floating point number in the network byte order (Big Endian)
inline fun Memory.storeDoubleAt(offset: Int, value: Double)
Write short signed 64bit floating point number in the network byte order (Big Endian)
posix
inline fun Memory.storeDoubleAt(offset: Int, value: Double)
Write short signed 64bit floating point number in the network byte order (Big Endian)
common
inline fun Memory.storeDoubleAt(offset: Long, value: Double)
Write short signed 64bit floating point number in the network byte order (Big Endian)
inline fun Memory.storeDoubleAt(offset: Long, value: Double)
Write short signed 64bit floating point number in the network byte order (Big Endian)
posix
inline fun Memory.storeDoubleAt(offset: Long, value: Double)
Write short signed 64bit floating point number in the network byte order (Big Endian)
storeFloatArray
Link copied to clipboard
common
fun Memory.storeFloatArray(offset: Int, source: FloatArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies floating point numbers from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
fun Memory.storeFloatArray(offset: Int, source: FloatArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies floating point numbers from from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
posix
fun Memory.storeFloatArray(offset: Int, source: FloatArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies floating point numbers from from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
common
fun Memory.storeFloatArray(offset: Long, source: FloatArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies floating point numbers from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
fun Memory.storeFloatArray(offset: Long, source: FloatArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies floating point numbers from from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
posix
fun Memory.storeFloatArray(offset: Long, source: FloatArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies floating point numbers from from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
storeFloatAt
Link copied to clipboard
common
inline fun Memory.storeFloatAt(offset: Int, value: Float)
Write short signed 32bit floating point number in the network byte order (Big Endian)
inline fun Memory.storeFloatAt(offset: Int, value: Float)
Write short signed 32bit floating point number in the network byte order (Big Endian)
posix
inline fun Memory.storeFloatAt(offset: Int, value: Float)
Write short signed 32bit floating point number in the network byte order (Big Endian)
common
inline fun Memory.storeFloatAt(offset: Long, value: Float)
Write short signed 32bit floating point number in the network byte order (Big Endian)
inline fun Memory.storeFloatAt(offset: Long, value: Float)
Write short signed 32bit floating point number in the network byte order (Big Endian)
posix
inline fun Memory.storeFloatAt(offset: Long, value: Float)
Write short signed 32bit floating point number in the network byte order (Big Endian)
storeIntArray
Link copied to clipboard
common
fun Memory.storeIntArray(offset: Int, source: IntArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies regular integers from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
fun Memory.storeIntArray(offset: Int, source: IntArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies regular integers from from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
posix
fun Memory.storeIntArray(offset: Int, source: IntArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies regular integers from from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
common
fun Memory.storeIntArray(offset: Long, source: IntArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies regular integers from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
fun Memory.storeIntArray(offset: Long, source: IntArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies regular integers from from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
posix
fun Memory.storeIntArray(offset: Long, source: IntArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies regular integers from from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
storeIntAt
Link copied to clipboard
common
inline fun Memory.storeIntAt(offset: Int, value: Int)
Write regular signed 32bit integer in the network byte order (Big Endian)
inline fun Memory.storeIntAt(offset: Int, value: Int)
Write regular signed 32bit integer in the network byte order (Big Endian)
posix
inline fun Memory.storeIntAt(offset: Int, value: Int)
Write regular signed 32bit integer in the network byte order (Big Endian)
common
inline fun Memory.storeIntAt(offset: Long, value: Int)
Write regular signed 32bit integer in the network byte order (Big Endian)
inline fun Memory.storeIntAt(offset: Long, value: Int)
Write regular signed 32bit integer in the network byte order (Big Endian)
posix
inline fun Memory.storeIntAt(offset: Long, value: Int)
Write regular signed 32bit integer in the network byte order (Big Endian)
storeLongArray
Link copied to clipboard
common
fun Memory.storeLongArray(offset: Int, source: LongArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies long integers from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
fun Memory.storeLongArray(offset: Int, source: LongArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies regular integers from from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
posix
fun Memory.storeLongArray(offset: Int, source: LongArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies regular integers from from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
common
fun Memory.storeLongArray(offset: Long, source: LongArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies long integers from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
fun Memory.storeLongArray(offset: Long, source: LongArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies regular integers from from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
posix
fun Memory.storeLongArray(offset: Long, source: LongArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies regular integers from from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
storeLongAt
Link copied to clipboard
common
inline fun Memory.storeLongAt(offset: Int, value: Long)
Write short signed 64bit integer in the network byte order (Big Endian)
inline fun Memory.storeLongAt(offset: Int, value: Long)
Write short signed 64bit integer in the network byte order (Big Endian)
posix
inline fun Memory.storeLongAt(offset: Int, value: Long)
Write short signed 64bit integer in the network byte order (Big Endian)
common
inline fun Memory.storeLongAt(offset: Long, value: Long)
write short signed 64bit integer in the network byte order (Big Endian)
inline fun Memory.storeLongAt(offset: Long, value: Long)
Write short signed 64bit integer in the network byte order (Big Endian)
posix
inline fun Memory.storeLongAt(offset: Long, value: Long)
Write short signed 64bit integer in the network byte order (Big Endian)
storeShortArray
Link copied to clipboard
common
fun Memory.storeShortArray(offset: Int, source: ShortArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies shorts integers from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
fun Memory.storeShortArray(offset: Int, source: ShortArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies shorts integers from from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
posix
fun Memory.storeShortArray(offset: Int, source: ShortArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies shorts integers from from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
common
fun Memory.storeShortArray(offset: Long, source: ShortArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies shorts integers from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
fun Memory.storeShortArray(offset: Long, source: ShortArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies shorts integers from from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
posix
fun Memory.storeShortArray(offset: Long, source: ShortArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies shorts integers from from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
storeShortAt
Link copied to clipboard
common
inline fun Memory.storeShortAt(offset: Int, value: Short)
Write short signed 16bit integer in the network byte order (Big Endian)
inline fun Memory.storeShortAt(offset: Int, value: Short)
Write short signed 16bit integer in the network byte order (Big Endian)
posix
inline fun Memory.storeShortAt(offset: Int, value: Short)
Write short signed 16bit integer in the network byte order (Big Endian)
common
inline fun Memory.storeShortAt(offset: Long, value: Short)
Write short signed 16bit integer in the network byte order (Big Endian)
inline fun Memory.storeShortAt(offset: Long, value: Short)
Write short signed 16bit integer in the network byte order (Big Endian)
posix
inline fun Memory.storeShortAt(offset: Long, value: Short)
Write short signed 16bit integer in the network byte order (Big Endian)
storeUByteArray
Link copied to clipboard
common
inline fun Memory.storeUByteArray(offset: Int, source: UByteArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies unsigned shorts integers from the source array at sourceOffset to this memory at the specified offset.
inline fun Memory.storeUByteArray(offset: Long, source: UByteArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies unsigned shorts integers from the source array at sourceOffset to this memory at the specified offset.
storeUIntArray
Link copied to clipboard
common
inline fun Memory.storeUIntArray(offset: Int, source: UIntArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies unsigned integers from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
inline fun Memory.storeUIntArray(offset: Long, source: UIntArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies unsigned integers from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
storeUIntAt
Link copied to clipboard
common
inline fun Memory.storeUIntAt(offset: Int, value: UInt)
Write regular unsigned 32bit integer in the network byte order (Big Endian)
inline fun Memory.storeUIntAt(offset: Long, value: UInt)
Write regular unsigned 32bit integer in the network byte order (Big Endian)
storeULongArray
Link copied to clipboard
common
inline fun Memory.storeULongArray(offset: Int, source: ULongArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies unsigned long integers from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
inline fun Memory.storeULongArray(offset: Long, source: ULongArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies unsigned long integers from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
storeULongAt
Link copied to clipboard
common
inline fun Memory.storeULongAt(offset: Int, value: ULong)
Write short signed 64bit integer in the network byte order (Big Endian)
inline fun Memory.storeULongAt(offset: Long, value: ULong)
Write short signed 64bit integer in the network byte order (Big Endian)
storeUShortArray
Link copied to clipboard
common
inline fun Memory.storeUShortArray(offset: Int, source: UShortArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies unsigned shorts integers from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
inline fun Memory.storeUShortArray(offset: Long, source: UShortArray, sourceOffset: Int = 0, count: Int = source.size - sourceOffset)
Copies unsigned shorts integers from the source array at sourceOffset to this memory at the specified offset interpreting numbers in the network order (Big Endian).
storeUShortAt
Link copied to clipboard
common
inline fun Memory.storeUShortAt(offset: Int, value: UShort)
Write short unsigned 16bit integer in the network byte order (Big Endian)
inline fun Memory.storeUShortAt(offset: Long, value: UShort)
Write short unsigned 16bit integer in the network byte order (Big Endian)
useMemory
Link copied to clipboard
common
fun <R> ByteArray.useMemory(offset: Int = 0, length: Int, block: (Memory) -> R): R
TODO KTOR-1673: Solve design problems
  1. length has no default (blocked by expect/actual with default value compiler bug (fixed in KT 1.4.3))

  2. no inline -> can't suspend inside block (blocked by inline compiler bug)

inline fun <R> ByteArray.useMemory(offset: Int = 0, length: Int, block: (Memory) -> R): R
Execute block of code providing a temporary instance of Memory view of this byte array range starting at the specified offset and having the specified bytes length.
posix
inline fun <R> ByteArray.useMemory(offset: Int = 0, length: Int, block: (Memory) -> R): R
Execute block of code providing a temporary instance of Memory view of this byte array range starting at the specified offset and having the specified bytes length.
withMemory
Link copied to clipboard
common
inline fun <R> withMemory(size: Int, block: (Memory) -> R): R
Invoke block function with a temporary Memory instance of the specified size in bytes.
inline fun <R> withMemory(size: Long, block: (Memory) -> R): R
Invoke block function with a temporary Memory instance of the specified size in bytes.

Properties

highByte
Link copied to clipboard
common
val Short.highByte: Byte
highInt
Link copied to clipboard
common
val Long.highInt: Int
highShort
Link copied to clipboard
common
val Int.highShort: Short
lowByte
Link copied to clipboard
common
val Short.lowByte: Byte
lowInt
Link copied to clipboard
common
val Long.lowInt: Int
lowShort
Link copied to clipboard
common
val Int.lowShort: Short