-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
20 lines (17 loc) · 705 Bytes
/
Copy pathMain.java
File metadata and controls
20 lines (17 loc) · 705 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
public class Main {
public static void main(String[] args) throws Exception {
if (args.length < 3) {
System.out.println("Usage:");
System.out.println("java Main compress input.pdf output.huff");
System.out.println("java Main decompress input.huff output.pdf");
return;
}
if (args[0].equalsIgnoreCase("compress")) {
FileCompressor.compress(args[1], args[2]);
System.out.println("Compression completed.");
} else if (args[0].equalsIgnoreCase("decompress")) {
FileDecompressor.decompress(args[1], args[2]);
System.out.println("Decompression completed.");
}
}
}