LZ 77 Compression source code in java