-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cs
39 lines (37 loc) · 1.17 KB
/
main.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Hoffman
{
class main
{
static void Main(string[] args)
{
ATPproject.MyModel mm = new ATPproject.MyModel();
try
{
Console.WriteLine(args[0]);
if (args[0] == "-c")
{
Console.WriteLine("File {0} Size Before Compress:{1}", args[1], mm.DoSize(args));
Console.WriteLine("Starting Compress..");
Console.WriteLine(mm.DoHuf(args));
args[1] = args[1] + ".huf";
Console.WriteLine("File {0} Size After Compress:{1}", args[1], mm.DoSize(args));
Console.Read();
}
if (args[0] == "-d")
{
Console.WriteLine("Starting DeCompress..");
Console.WriteLine(mm.DoUnhuf(args));
Console.Read();
}
}
catch(Exception e)
{
Console.WriteLine(e.Message);
}
}
}
}