diff --git a/.DS_Store b/.DS_Store
index 81229e8..1d62b9f 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/.classpath b/.classpath
index 1cd9d95..0cbf9cd 100644
--- a/.classpath
+++ b/.classpath
@@ -1,10 +1,6 @@
-
-
-
-
-
+
diff --git a/.project b/.project
index 86cd90b..10a5c53 100644
--- a/.project
+++ b/.project
@@ -1,6 +1,6 @@
- LZWCompression
+ LZW-Compression
diff --git a/ReadMe b/ReadMe
index 5e46fca..ab6c945 100644
--- a/ReadMe
+++ b/ReadMe
@@ -5,4 +5,9 @@ uses the method fillInitialValues() to fill the HashMap dict with the pre-determ
It then calls the method compress which uses a buffered reader and a for loop to run through each char in the file.
It adds combinations of these chars with arbitrary, decimal askii values to dict. The for loop also converts these
decimals to binary before adding them to the string binaryString. binaryString is converted into a char array of 0s and 1s,
-which is then converted to a byte array, which is then used by the FileOutputStream to write a binary file.
\ No newline at end of file
+which is then converted to a byte array, which is then used by the FileOutputStream to write a binary file.
+
+ROHAN: Ariana used 9 bits
+The decoder does not work, I am unsure if it is an issue with the decoder or your encoder
+It outputs something for file 1, but it is not right
+It gets an error for file 3
\ No newline at end of file
diff --git a/decoded.txt b/decoded.txt
new file mode 100644
index 0000000..a469dd0
--- /dev/null
+++ b/decoded.txt
@@ -0,0 +1 @@
+Æ888HHH(```d
\ No newline at end of file
diff --git a/src/RohanDecoder.java b/src/RohanDecoder.java
new file mode 100644
index 0000000..1de3419
--- /dev/null
+++ b/src/RohanDecoder.java
@@ -0,0 +1,143 @@
+import java.util.*;
+
+import java.io.*;
+import java.nio.file.*;
+
+public class RohanDecoder {
+
+ public HashMap dictionary;
+ public String binary;
+ int binaryIndex;
+ ArrayList numberValues;
+
+ public RohanDecoder() {
+ binary = "";
+ dictionary = new HashMap();
+ this.makeDictionary();
+ }
+
+ public void makeDictionary() {
+ for(int i = 0; i<256; i++) {
+ dictionary.put(i, "" + (char)i);
+ }
+ }
+
+ public void ByteToBinary() throws IOException {
+ FileInputStream input = new FileInputStream("trashbin");
+
+ binary = "";
+ byte[] byteArray = input.readAllBytes();
+ //System.out.println(byteArray);
+
+ for(int i =0;i();
+
+ for(int i = 0;i <= binary.length() - 9; i+=9) {
+// System.out.println("next number = " + this.getNextNumberFromBinary());
+// System.out.println("list = " + this.numberValues);
+ //System.out.println(dictionary.get(this.getNextNumberFromBinary()));
+ //numberValues.add(getNextNumberFromBinary());
+// if(i+9 > binary.length()) {
+// break;
+// }
+
+ numberValues.add(binaryToNumber(binary.substring(i,i+9)));
+ }
+ }
+
+ public static int binaryToNumber(String a) //found online
+ {
+ int ans = 0;
+ for(int i = 0;i<9;i++)
+ {
+ if(a.charAt(i)=='1')
+ {
+ ans+=(1<<(8-i));
+ }
+ }
+ return ans;
+ }
+
+
+
+ public String toBinary(int number)
+ {
+ String cur =Integer.toBinaryString(number);
+ StringBuilder ans = new StringBuilder();
+ while(cur.length()+ans.length()<8)
+ {
+ ans.append("0");
+ }
+ if(cur.length()>8)
+ {
+ cur = cur.substring(cur.length()-8);
+ }
+ ans.append(cur);
+ return ans.toString();
+ }
+}
diff --git a/src/TestLZW.java b/src/TestLZW.java
index d7a41d3..5fdee2e 100644
--- a/src/TestLZW.java
+++ b/src/TestLZW.java
@@ -7,5 +7,8 @@ public static void main (String [] args) throws IOException
File testFile = new File ("lzw-file1.txt");
LZWCompression compressy= new LZWCompression (testFile);
+ RohanDecoder decode = new RohanDecoder();
+ decode.decode();
+
}
}