3 writes to _buffer
System.IO.Compression (3)
System\IO\Compression\DeflateZLib\DeflateStream.cs (3)
144
_buffer
= ArrayPool<byte>.Shared.Rent(DefaultBufferSize);
735
_buffer
= null;
788
_buffer
= null;
34 references to _buffer
System.IO.Compression (34)
System\IO\Compression\DeflateZLib\DeflateStream.cs (34)
140
[MemberNotNull(nameof(
_buffer
))]
143
Debug.Assert(
_buffer
== null);
147
[MemberNotNull(nameof(
_buffer
))]
150
if (
_buffer
== null)
221
Debug.Assert(_deflater != null &&
_buffer
!= null);
231
flushSuccessful = _deflater.Flush(
_buffer
, out compressedBytes);
234
await _stream.WriteAsync(new ReadOnlyMemory<byte>(
_buffer
, 0, compressedBytes), cancellationToken).ConfigureAwait(false);
314
int n = _stream.Read(
_buffer
, 0,
_buffer
.Length);
328
else if (n >
_buffer
.Length)
334
_inflater.SetInput(
_buffer
, 0, n);
459
int n = await _stream.ReadAsync(new Memory<byte>(
_buffer
, 0,
_buffer
.Length), cancellationToken).ConfigureAwait(false);
473
else if (n >
_buffer
.Length)
479
_inflater.SetInput(
_buffer
, 0, n);
568
Debug.Assert(_deflater != null &&
_buffer
!= null);
571
int compressedBytes = _deflater.GetDeflateOutput(
_buffer
);
574
_stream.Write(
_buffer
, 0, compressedBytes);
587
Debug.Assert(_deflater != null &&
_buffer
!= null);
593
flushSuccessful = _deflater.Flush(
_buffer
, out compressedBytes);
596
_stream.Write(
_buffer
, 0, compressedBytes);
618
Debug.Assert(_deflater != null &&
_buffer
!= null);
634
finished = _deflater.Finish(
_buffer
, out compressedBytes);
637
_stream.Write(
_buffer
, 0, compressedBytes);
650
finished = _deflater.Finish(
_buffer
, out _);
665
Debug.Assert(_deflater != null &&
_buffer
!= null);
681
finished = _deflater.Finish(
_buffer
, out compressedBytes);
684
await _stream.WriteAsync(new ReadOnlyMemory<byte>(
_buffer
, 0, compressedBytes)).ConfigureAwait(false);
697
finished = _deflater.Finish(
_buffer
, out _);
732
byte[]? buffer =
_buffer
;
785
byte[]? buffer =
_buffer
;
868
Debug.Assert(_deflater != null &&
_buffer
!= null);
871
int compressedBytes = _deflater.GetDeflateOutput(
_buffer
);
874
await _stream.WriteAsync(new ReadOnlyMemory<byte>(
_buffer
, 0, compressedBytes), cancellationToken).ConfigureAwait(false);