Added checkEndOfFile() and modify LZ78_Compressor()