Robust and fast checksum algorithm?

前端 未结 10 1648
失恋的感觉
失恋的感觉 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 21:02

    There are lots of fast CRC algorithms that should do the trick: http://www.google.com/search?hl=en&q=fast+crc&aq=f&oq=

    Edit: Why the hate? CRC is totally appropriate, as evidenced by the other answers. A Google search was also appropriate, since no language was specified. This is an old, old problem which has been solved so many times that there isn't likely to be a definitive answer.

提交回复
热议问题