private async ValueTask <Stream> CreateContentReadStreamAsyncCore(bool async, CancellationToken cancellationToken)
            {
                if (_contentConsumed)
                {
                    throw new InvalidOperationException(SR.net_http_content_stream_already_read);
                }

                _contentConsumed = true;

                Stream originalStream;

                if (async)
                {
                    originalStream = _originalContent.TryReadAsStream() ?? await _originalContent.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
                }
                else
                {
                    originalStream = _originalContent.ReadAsStream();
                }
                return(GetDecompressedStream(originalStream));
            }