当以块的形式上传大文件并且每个块都经过 CRC 验证时,我应该在完成时对整个文件进行 CRC 验证吗?
我编写了一个小程序和服务器,用于通过 HTTP 上传大文件,并具有 CRC 验证和恢复功能。它工作得很好,但我想知道我是否应该重新考虑一些有效性检查,因为它可能是多余的。
问题的标题实际上说明了一切。
检查整个文件的 CRC 有效性是否完全多余?因为我知道每个块都是有效的,并且在将文件压缩在一起时应该仍然有效(如果没有文件系统错误,在这种情况下我应该遇到很大的麻烦),我认为应该足以合理地确定上传顺利进行。
你怎么认为?
此致
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这应该是不必要的,如果块是正确的,那么组合后的块怎么会不正确呢?
This shouldn't be necessary, if the chunks are correct then how would the combined chunks not be correct?