System.IO.Compression.DeflateStream.WriteAsyncCore C# (CSharp) Method

WriteAsyncCore() private method

private WriteAsyncCore ( byte array, int offset, int count, CancellationToken cancellationToken ) : System.Threading.Task
array byte
offset int
count int
cancellationToken System.Threading.CancellationToken
return System.Threading.Task
        private async Task WriteAsyncCore(byte[] array, int offset, int count, CancellationToken cancellationToken)
        {
            AsyncOperationStarting();
            try
            {
                await WriteDeflaterOutputAsync(cancellationToken).ConfigureAwait(false);

                // Pass new bytes through deflater
                _deflater.SetInput(array, offset, count);

                await WriteDeflaterOutputAsync(cancellationToken).ConfigureAwait(false);

                _wroteBytes = true;
            }
            finally
            {
                AsyncOperationCompleting();
            }
        }