internal void Close() { if (bgReader != null) { bgReader.Exit(); } bgReader = null; if (src != null) { src.Close(); } src = null; }
public BigStream(string filename) { src = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read | FileShare.Delete); if (filename.EndsWith(".csvz")) { InitArchiveSettings(); } bgReader = new BackgroundReader(src, offsets); bgThread = new System.Threading.Thread(() => { bgReader.DoWork(); }); bgThread.Start(); bgReader.Seek(0); cb = ReadBuffer(stm_buffer, 0, stm_buffer.Length); ib = 0; }