2 writes to _buffer
System.IO.Compression.Brotli (2)
System\IO\Compression\BrotliStream.cs (2)
59
_buffer
= ArrayPool<byte>.Shared.Rent(DefaultInternalBufferSize);
130
_buffer
= null!;
14 references to _buffer
System.IO.Compression.Brotli (14)
System\IO\Compression\BrotliStream.cs (1)
127
byte[] buffer =
_buffer
;
System\IO\Compression\dec\BrotliStream.Decompress.cs (8)
66
int bytesRead = _stream.Read(
_buffer
, _bufferCount,
_buffer
.Length - _bufferCount);
77
if (_bufferCount >
_buffer
.Length)
154
int bytesRead = await _stream.ReadAsync(
_buffer
.AsMemory(_bufferCount), cancellationToken).ConfigureAwait(false);
165
if (_bufferCount >
_buffer
.Length)
187
OperationStatus lastResult = _decoder.Decompress(new ReadOnlySpan<byte>(
_buffer
, _bufferOffset, _bufferCount), destination, out int bytesConsumed, out bytesWritten);
230
new ReadOnlySpan<byte>(
_buffer
, _bufferOffset, _bufferCount).CopyTo(
_buffer
);
System\IO\Compression\enc\BrotliStream.Compress.cs (5)
85
Span<byte> output = new Span<byte>(
_buffer
);
163
Memory<byte> output = new Memory<byte>(
_buffer
);
172
await _stream.WriteAsync(new ReadOnlyMemory<byte>(
_buffer
, 0, bytesWritten), cancellationToken).ConfigureAwait(false);
193
Span<byte> output = new Span<byte>(
_buffer
);
236
Memory<byte> output = new Memory<byte>(
_buffer
);