encode and decode files in virtualenv, zlib and base64