Preparing file for compression