public void decode() {
		//First check if this file contains the magic number(Is compressed with this algorithm)
		try { 
			if(iFile.readChar() == 'H' && iFile.readChar() == 'C') {
				boolean bit;
				head = new HuffmanNode();
				HuffmanTree.buildHuffmanTree(iFile, head); //Rebuild serialized tree
				
				if(head.isLeaf()) { //Single char tree(no parent nodes)
					while(!iFile.EndOfFile()) {
						iFile.readBit(); 
						oFile.write(head.getCharacter()); //writeChar(head.getCharacter()); 
					}
				} else {
					HuffmanNode cur = head; 
					
					while(!iFile.EndOfFile()) { 
						bit = iFile.readBit(); 
						if(bit) {
							cur = cur.getRight(); 
						} else { 
							cur = cur.getLeft(); 
						}
						
						if(cur.isLeaf()) { 
							oFile.write(cur.getCharacter()); 
							cur = head; 
						}
					}
				}
				iFile.close(); 
				oFile.close(); 
			} else {
				System.out.println("Error could not decompress: This file has not been compressed with this format. ");
			}
		} catch (IOException e) { 
			System.out.println("Problem writing to the decoded file. Shutting down");
		}
	}