Xojo.IO.BinaryStream.Constructor(mb As MemoryBlock)
From Xojo Documentation
Constructor
Creates a BinaryStream from a MemoryBlock.
Notes
A BinaryStream created using a MemoryBlock will automatically re-size the MemoryBlock as needed to contain any additional data written to the stream.
Sample Code
Create binary data from an Image in the iOS project: