encode and decode files using base64 and zlib