<PackageReference Include="Azure.Storage.Files.DataLake" Version="12.22.0" />

Azure.Storage.Shared.PooledMemoryStream

Functions like a readable MemoryStream but uses an ArrayPool to supply the backing memory. This stream support buffering long sizes.
namespace Azure.Storage.Shared { internal class PooledMemoryStream : Stream { public int MaxArraySize { get; } public ArrayPool<byte> ArrayPool { get; } public PooledMemoryStream(ArrayPool<byte> arrayPool, int maxArraySize); public PooledMemoryStream(); public void Clear(); } }