Implemented compress()