<div dir="ltr"><div><div>I want to create a buffer with the layout <br></div><div><br></div><span style="font-family:monospace,monospace">0           4           8           12      13      14      15      16<br>[   x:Float   |</span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">   y:Float   </span>|</span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">   z:Float   </span>| r:UInt8 | g:UInt8 | b:UInt8 | _:UInt8 ]</span><br></div><div><br></div>Normally, I’d use <span style="font-family:monospace,monospace">UnsafeRawBufferPointer</span> for this, but I need the buffer to be a vector (i.e. with <span style="font-family:monospace,monospace">append(_:)</span>), and for it to return a Swift-managed <span style="font-family:monospace,monospace">Array&lt;UInt8&gt;</span>. How should I do this? The project does not use Foundation.<br></div>