稳健和快速的校验算法?

编程入门 行业动态 更新时间:2024-10-14 08:25:03
本文介绍了稳健和快速的校验算法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

这校验算法,可以在如下的用例建议?

Which checksum algorithm can you recommend in the following use case?

我要生成的小JPEG文件校验(〜每个8 KB),以检查的内容发生变化。用文件系统的的修改日期的是不幸的是没有一个选项。 校验的不需要是保密性强,但它应该稳健地表明任何规模的变化。

I want to generate checksums of small JPEG files (~8 kB each) to check if the content changed. Using the filesystem's date modified is unfortunately not an option. The checksum need not be cryptographically strong but it should robustly indicate changes of any size.

第二个标准是速度,因为它应该能够处理至少数百的每秒图像(在现代的CPU)。

The second criterion is speed since it should be possible to process at least hundreds of images per second (on a modern CPU).

计算将与多个客户做了服务器上。客户端发送了千兆TCP图像到服务器。因此,有否磁盘I / O 作为瓶颈。

The calculation will be done on a server with several clients. The clients send the images over Gigabit TCP to the server. So there's no disk I/O as bottleneck.

推荐答案

如果你有许多小文件,你的瓶颈将是文件I / O和可能不是一个校验和算法。

If you have many small files, your bottleneck is going to be file I/O and probably not a checksum algorithm.

的散列函数(可以看作是一个校验)的名单可以在这里找到 。

A list of hash functions (which can be thought of as a checksum) can be found here.

有没有什么原因,你不能使用修改文件系统的日期,以确定文件是否已经改变?这可能会更快。

Is there any reason you can't use the filesystem's date modified to determine if a file has changed? That would probably be faster.

更多推荐

稳健和快速的校验算法?

本文发布于:2023-11-29 20:04:21,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1647489.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:稳健   算法   快速

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!