2 writes to _stream
System.IO.Compression.Brotli (2)
System\IO\Compression\BrotliStream.cs (2)
57
_stream
= stream;
123
_stream
= null!;
18 references to _stream
System.IO.Compression.Brotli (18)
System\IO\Compression\BrotliStream.cs (10)
64
ObjectDisposedException.ThrowIf(
_stream
is null, this);
73
if (disposing &&
_stream
!= null)
82
_stream
.Dispose();
102
if (
_stream
!= null)
111
await
_stream
.DisposeAsync().ConfigureAwait(false);
141
public Stream BaseStream =>
_stream
;
144
public override bool CanRead => _mode == CompressionMode.Decompress &&
_stream
!= null &&
_stream
.CanRead;
147
public override bool CanWrite => _mode == CompressionMode.Compress &&
_stream
!= null &&
_stream
.CanWrite;
System\IO\Compression\dec\BrotliStream.Decompress.cs (2)
66
int bytesRead =
_stream
.Read(_buffer, _bufferCount, _buffer.Length - _bufferCount);
154
int bytesRead = await
_stream
.ReadAsync(_buffer.AsMemory(_bufferCount), cancellationToken).ConfigureAwait(false);
System\IO\Compression\enc\BrotliStream.Compress.cs (6)
94
_stream
.Write(output.Slice(0, bytesWritten));
172
await
_stream
.WriteAsync(new ReadOnlyMemory<byte>(_buffer, 0, bytesWritten), cancellationToken).ConfigureAwait(false);
202
_stream
.Write(output.Slice(0, bytesWritten));
206
_stream
.Flush();
242
await
_stream
.WriteAsync(output.Slice(0, bytesWritten), cancellationToken).ConfigureAwait(false);
245
await
_stream
.FlushAsync(cancellationToken).ConfigureAwait(false);