Код: Выделить всё
at System.IO.Strategies.BufferedFileStreamStrategy.WriteSpan(ReadOnlySpan`1 source, ArraySegment`1 arraySegment)
at System.IO.Strategies.BufferedFileStreamStrategy.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at System.IO.StreamWriter.WriteLine(String value)
Код: Выделить всё
using var reader = new StreamReader(inputFilename);
using var writer = new StreamWriter(new GZipStream(File.Create(outputFilename), CompressionMode.Compress));
while ((line = reader.ReadLine()) != null)
{
// process `line`
writer.WriteLine(line);
}
- Раздел имеет тип NTFS и не заполнен.
- Имя выходного файла не блокируется и не открывается какой-либо другой программой.
Код: Выделить всё
~500GB
мне было интересно, не упускаю ли я что -то в Stremwriter .
Подробнее здесь: https://stackoverflow.com/questions/793 ... limitation