read

inline fun <R> Memory.read(block: MemoryReader.() -> R): R

Uses the memory for read then releases the reader.

fun <T : Any> MemoryReader.read(spec: MemorySpec<T>, offset: Int): T

Reads the object with spec starting from offset.