public ChunkReader(int id, long bufferSize) { ID = id; BufferSize = bufferSize; _chunk = new StreamReader(Consts.GetChunkFileName(id)); _buffer = new Queue <ProblemString>(); Load(); }
public void Write() { Console.WriteLine($"Start write chunk {ID}, {_data.Count} lines"); var stopwatch = Stopwatch.StartNew(); File.WriteAllLines(Consts.GetChunkFileName(ID), _data.Select(x => x.RawString)); stopwatch.Stop(); Console.WriteLine($"Write chunk {ID} DONE in {stopwatch.Elapsed}, {_data.Count} lines"); }