-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.java
22 lines (21 loc) · 799 Bytes
/
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.PrintStream;
/**
* Created by paulp on 02.01.2016.
*/
public class Main {
static void compress() throws Exception{
System.setIn(new FileInputStream("C:\\Users\\paulp\\Desktop\\in.txt"));
System.setOut(new PrintStream(new FileOutputStream("C:\\Users\\paulp\\Desktop\\out.bin")));
RunLength.main(new String[]{"+"});
}
static void decompress()throws Exception{
System.setIn(new FileInputStream("C:\\Users\\paulp\\Desktop\\out.bin"));
System.setOut(new PrintStream(new FileOutputStream("C:\\Users\\paulp\\Desktop\\out.txt")));
RunLength.main(new String[]{"-"});
}
public static void main(String[] args) throws Exception {
decompress();
}
}