compress raw data before uploading