CompressionStream.WriteAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
WriteAsync(ReadOnlyMemory<Byte>, CancellationToken) | |
WriteAsync(Byte[], Int32, Int32, CancellationToken) |
Asynchronously writes compressed bytes to the underlying stream from the specified byte array. |
WriteAsync(ReadOnlyMemory<Byte>, CancellationToken)
public override System.Threading.Tasks.ValueTask WriteAsync (ReadOnlyMemory<byte> source, System.Threading.CancellationToken cancellationToken);
abstract member WriteAsync : ReadOnlyMemory<byte> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
override this.WriteAsync : ReadOnlyMemory<byte> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
Parameters
- source
- ReadOnlyMemory<Byte>
- cancellationToken
- CancellationToken
Returns
Applies to
WriteAsync(Byte[], Int32, Int32, CancellationToken)
Asynchronously writes compressed bytes to the underlying stream from the specified byte array.
public override System.Threading.Tasks.Task WriteAsync (byte[] array, int offset, int count, System.Threading.CancellationToken cancellationToken);
abstract member WriteAsync : byte[] * int * int * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.WriteAsync : byte[] * int * int * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Parameters
- array
- Byte[]
The buffer to write data from.
- offset
- Int32
The zero-based byte offset in array from which to begin copying bytes to the stream.
- count
- Int32
The maximum number of bytes to write.
- cancellationToken
- CancellationToken
The token to monitor for cancellation requests.
Returns
A task that represents the asynchronous write operation.