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

Azure.Storage.Shared.PooledMemoryStream

Functions like a readable MemoryStream but uses an ArrayPool to supply the backing memory. This stream support buffering long sizes.
public ArrayPool<byte> ArrayPool { get; }

The backing array pool.

public int MaxArraySize { get; }

Size to rent from MemoryPool.

public PooledMemoryStream(ArrayPool<byte> arrayPool, int maxArraySize)

Parameterless constructor for mocking.

public void Clear()