finished compressFile implementation though I have not tested it yet