Function libCZI::CreateStreamFromMemory(std::shared_ptr<const void>, size_t)#
Defined in File libCZI.h
Function Documentation#
-
std::shared_ptr<IStream> libCZI::CreateStreamFromMemory(std::shared_ptr<const void> ptr, size_t dataSize)#
Creates a stream-object on a memory-block. The stream retains shared ownership of the memory-block; its contents must remain unchanged while used for reading. A zero-sized block creates an empty stream and may have a null pointer. Reads follow the IStream::Read contract, including reads at or beyond the end of the block.
- Parameters:
ptr – Shared pointer to a memory-block, non-null when dataSize is nonzero.
dataSize – Size of the memory-block.
- Returns:
The new stream object.