add support for encryption after compression