Encode() now reads through all the characters in the file and encodes them using the HashMap