I want to split a 261MB file into 64MB chunks. I have done it but it takes about 15-16 seconds when I read original file and write it into my parts characterwise. Is there a better and optimised way to do that.
Thanks in advance.
I now have come to 3 sec by reading and writing in blocks of 256MB.Can it still be optimised
If you mean you are reading with
fgetcand writing withfputc, then replacing these withfreadandfwriteto process data in bigger chunks (try 4KB and upwards) will result in a big speedup.