How to get bytes out of an UnsafeMutableRawPointer?
load<T> reads raw bytes from memory and constructs a value of type T: let ptr = … // Unsafe[Mutable]RawPointer let i16 = ptr.load(as: UInt16.self) optionally at a byte offset: let i16 = ptr.load(fromByteOffset: 4, as: UInt16.self) There is also assumingMemoryBound() which converts from a Unsafe[Mutable]RawPointer to a Unsafe[Mutable]Pointer<T>, assuming that the pointed-to memory contains a … Read more