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))] 143Debug.Assert(_buffer == null); 147[MemberNotNull(nameof(_buffer))] 150if (_buffer == null) 221Debug.Assert(_deflater != null && _buffer != null); 231flushSuccessful = _deflater.Flush(_buffer, out compressedBytes); 234await _stream.WriteAsync(new ReadOnlyMemory<byte>(_buffer, 0, compressedBytes), cancellationToken).ConfigureAwait(false); 314int n = _stream.Read(_buffer, 0, _buffer.Length); 328else if (n > _buffer.Length) 334_inflater.SetInput(_buffer, 0, n); 459int n = await _stream.ReadAsync(new Memory<byte>(_buffer, 0, _buffer.Length), cancellationToken).ConfigureAwait(false); 473else if (n > _buffer.Length) 479_inflater.SetInput(_buffer, 0, n); 568Debug.Assert(_deflater != null && _buffer != null); 571int compressedBytes = _deflater.GetDeflateOutput(_buffer); 574_stream.Write(_buffer, 0, compressedBytes); 587Debug.Assert(_deflater != null && _buffer != null); 593flushSuccessful = _deflater.Flush(_buffer, out compressedBytes); 596_stream.Write(_buffer, 0, compressedBytes); 618Debug.Assert(_deflater != null && _buffer != null); 634finished = _deflater.Finish(_buffer, out compressedBytes); 637_stream.Write(_buffer, 0, compressedBytes); 650finished = _deflater.Finish(_buffer, out _); 665Debug.Assert(_deflater != null && _buffer != null); 681finished = _deflater.Finish(_buffer, out compressedBytes); 684await _stream.WriteAsync(new ReadOnlyMemory<byte>(_buffer, 0, compressedBytes)).ConfigureAwait(false); 697finished = _deflater.Finish(_buffer, out _); 732byte[]? buffer = _buffer; 785byte[]? buffer = _buffer; 868Debug.Assert(_deflater != null && _buffer != null); 871int compressedBytes = _deflater.GetDeflateOutput(_buffer); 874await _stream.WriteAsync(new ReadOnlyMemory<byte>(_buffer, 0, compressedBytes), cancellationToken).ConfigureAwait(false);