public MainWindow() { InitializeComponent(); textLog = new StringText(); fileToCompress = String.Empty; huffmanTree = new HuffmanTree(); finalCode = String.Empty; }
public static string LoadTxt(string path) { StringText fullText = new StringText(); using (FileStream fs = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) using (BufferedStream bs = new BufferedStream(fs)) using (StreamReader reader = new StreamReader(fs)) { while (!reader.EndOfStream) { fullText.ComposeText(reader.ReadLine()); } } return(fullText.ToString()); }