<commit_before>using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using MonoTorrent.Common;

namespace MonoTorrent.Client
{
    internal class TorrentFileStream : FileStream
    {
        TorrentFile file;

        public TorrentFile File
        {
            get { return file; }
        }

        public string Path
        {
            get { return file.FullPath; }
        }


        public TorrentFileStream(TorrentFile file, FileMode mode, FileAccess access, FileShare share)
            : base(file.FullPath, mode, access, share)
        {
            this.file = file;
        }
    }
}
<commit_msg>Don't use a managed buffer for FileStreams. MonoTorrents usage pattern is to always read in 16kB chunks, so its a waste for FileStream to buffer.<commit_after>using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using MonoTorrent.Common;

namespace MonoTorrent.Client
{
    internal class TorrentFileStream : FileStream
    {
        TorrentFile file;

        public TorrentFile File
        {
            get { return file; }
        }

        public string Path
        {
            get { return file.FullPath; }
        }


        public TorrentFileStream(TorrentFile file, FileMode mode, FileAccess access, FileShare share)
            : base(file.FullPath, mode, access, share, 1)
        {
            this.file = file;
        }
    }
}

{'fraction_non_alphanumeric': 0.07097680955727337, 'fraction_numerical': 0.0021082220660576245, 'mean_word_length': 2.0956521739130434, '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': '5447744', 'n_tokens_mistral': 398, 'n_tokens_neox': 384, 'n_words': 115}