adding compress_and_encrypt_path so that we do not have to load it all in memory