コード例 #1
0
 public MainWindow()
 {
     InitializeComponent();
     textLog        = new StringText();
     fileToCompress = String.Empty;
     huffmanTree    = new HuffmanTree();
     finalCode      = String.Empty;
 }
コード例 #2
0
        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());
        }