System.IO.Compression.GZipStream.BeginWrite Method

Begins an asynchronous write operation. (Consider using the System.IO.Stream.WriteAsync(Byte[], int, int) method instead; see the Remarks section.)

Syntax

public override IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback cback, object state)

Parameters

buffer
Documentation for this section has not yet been entered.
cback
Documentation for this section has not yet been entered.
state
Documentation for this section has not yet been entered.
offset
The byte offset in array at which to begin writing.
count
The maximum number of bytes to write.

Returns

An object that represents the asynchronous write operation, which could still be pending.

Remarks

Starting with the net_v45, you can perform asynchronous write operations by using the System.IO.Stream.WriteAsync(Byte[], int, int) method. The GZipStream.BeginWrite(Byte[], int, int, AsyncCallback, object) method is still available in net_v45 to support legacy code; however, you can implement asynchronous I/O operations more easily by using the new async methods. For more information, see Asynchronous File I/O.

The GZipStream.BeginWrite(Byte[], int, int, AsyncCallback, object) method starts an asynchronous write operation to a System.IO.Compression.GZipStream stream object.

You must create a callback method that implements the AsyncCallback delegate and pass its name to the GZipStream.BeginWrite(Byte[], int, int, AsyncCallback, object) method.

Requirements

Namespace: System.IO.Compression
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0