-
Notifications
You must be signed in to change notification settings - Fork 0
/
testScript.sh
52 lines (34 loc) · 877 Bytes
/
testScript.sh
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
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/sh
make clean
make
cp $1 test_file
echo "\nRunning RLE Compression"
time ./rleEncode test_file
echo "\nRunning RLE Decompression"
time ./rleDecode test_file.rle
echo "\nTesting..."
./isCopy test_file $1
echo "\nRLE Compression Statistics: \n"
echo "Original File: "
ls -l $1 | awk '{print $5}'
echo "Compressed File"
ls -l test_file.rle | awk '{print $5}'
echo "Uncompressed File"
ls -l test_file | awk '{print $5}'
rm test_file*
cp $1 test_file
echo "\nRunning LZW Compression"
time ./lzwEncode test_file
echo "\nRunning LZW Decompression"
time ./lzwDecode test_file.lzw
echo "\nTesting..."
./isCopy test_file $1
echo "\nLZE Compression Statistics: \n"
echo "Original File: "
ls -l $1 | awk '{print $5}'
echo "Compressed File"
ls -l test_file.lzw | awk '{print $5}'
echo "Uncompressed File"
ls -l test_file | awk '{print $5}'
rm test_file*
make clean