add the compression java code