<commit_before>﻿using System.IO;
using System.IO.Compression;
using System.Web;

namespace Kudu.Services
{
    public static class HttpRequestExtensions
    {
        public static Stream GetInputStream(this HttpRequestBase request)
        {
            var contentEncoding = request.Headers["Content-Encoding"];

            if (contentEncoding != null && contentEncoding.Contains("gzip"))
            {
                return new GZipStream(request.InputStream, CompressionMode.Decompress);
            }

            return request.InputStream;
        }
    }
}
<commit_msg>Use bufferless stream to improve perf and resource usage<commit_after>﻿using System.IO;
using System.IO.Compression;
using System.Web;

namespace Kudu.Services
{
    public static class HttpRequestExtensions
    {
        public static Stream GetInputStream(this HttpRequestBase request)
        {
            var contentEncoding = request.Headers["Content-Encoding"];

            if (contentEncoding != null && contentEncoding.Contains("gzip"))
            {
                return new GZipStream(request.GetBufferlessInputStream(), CompressionMode.Decompress);
            }

            return request.GetBufferlessInputStream();
        }
    }
}

{'fraction_non_alphanumeric': 0.08285946385052803, 'fraction_numerical': 0.0, 'mean_word_length': 2.571014492753623, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4723986', 'n_tokens_mistral': 302, 'n_tokens_neox': 293, 'n_words': 70}