<PackageReference Include="Azure.Storage.Blobs" Version="12.25.0" />

StreamExtensions

static class StreamExtensions
Extension methods for working with Streams.
public static Task<long> CopyToExactInternal(this Stream src, Stream dst, long count, bool async, CancellationToken cancellationToken)

public static Task<long> CopyToExactInternal(this Stream src, Stream dst, long count, int copyBufferSize, bool async, CancellationToken cancellationToken)

public static Task CopyToInternal(this Stream src, Stream dest, bool async, CancellationToken cancellationToken)

public static Task CopyToInternal(this Stream src, Stream dest, int bufferSize, bool async, CancellationToken cancellationToken)

Reads the bytes from the source stream and writes them to the destination stream.

public static long? GetLengthOrDefault(this Stream content)

Some streams will throw if you try to access their length so we wrap the check in a TryGet helper.

public static Task<int> ReadInternal(this Stream stream, byte[] buffer, int offset, int count, bool async, CancellationToken cancellationToken)

public static Stream WithNoDispose(this Stream stream)

public static Task WriteInternal(this Stream stream, byte[] buffer, int offset, int count, bool async, CancellationToken cancellationToken)