compress and encrypt