BinaryStream.Constructor(mb as MemoryBlock)
From Xojo Documentation
Constructor
Creates a BinaryStream from a MemoryBlock.
Notes
All BinaryStream functions are supported. If the MemoryBlock was created from a Declare, then the Length property of the BinaryStream will always report -1.
A BinaryStream created using a MemoryBlock will automatically re-size the MemoryBlock as needed to contain any additional data written to the stream.