Max
Max

Reputation: 4405

When uploading large files in chunks, and each chunk is CRC-validated, should I CRC-validate the whole file on completion?

I have written a small program and server to upload large files over HTTP with CRC validation and resume-functionality. It works pretty well as it is, but I am wondering if I should reconsider some of the validity checking, because it might be redundant.

The title of the question actually says it all.

Is it wholly redundant to check the CRC validity of the complete file? Since I know that each chunk is valid, and should still be valid (if there has not been a file system error, in which case I should be in el grande trouble anyway) at the time of zipping the file together, I think it should be enough to be reasonably sure that the upload went smoothly.

What do you think?

Best regards

Upvotes: 2

Views: 673

Answers (1)

cusimar9
cusimar9

Reputation: 5259

This shouldn't be necessary, if the chunks are correct then how would the combined chunks not be correct?

Upvotes: 1

Related Questions