Reads a file and encodes the file into a binary file with n bits per char depending on how many chars you've used