Robust and fast checksum algorithm?

前端 未结 10 1643
失恋的感觉
失恋的感觉 2020-12-23 20:30

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

I want to generate checksums of small JPEG files (~8 kB each) to check if the content changed.

10条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-23 20:48

    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.

提交回复
热议问题