compress to a file