OV2 / RapidCRC-Unicode

Windows tool to quickly create and verify hash checksums
https://www.ov2.eu/programs/rapidcrc-unicode
GNU General Public License v2.0
300 stars 29 forks source link

[Feature request] Update checksum #49

Open MrDito opened 7 years ago

MrDito commented 7 years ago

When you calculated checksums for a directory of many files and need to add multiple files in a regular interval, it would be a great feature to update the exisiting checksum file by the checksums of the new added files.

Besides, you could add the option for the update process, first to check the old files by the existing checksum file (since check is much faster than recreate) and alert on corruption/error (or optionally update checksum). And then update by the new files.

So you would get an ultimate update function to keep checksums easily up to date.

vatterspun commented 7 years ago

Why not just generate a new file everytime and overwrite the old file? Why update an existing list?

MrDito commented 7 years ago

The problem occures for example when you have a checksum file for a whole bunch (thousands) of files and just want to add/update a couple. First, you need to check all files by the existing checksum file and then, in a second run, have to generate a new checksum file which includes the new files besides the existing ones. So it's necessary to calculate the checksums for all existing files twice (first to check file integrity and second to generate new checksum file). Especially for lots of files (multiple gigabytes) this can be very time-consuming since it claims the doubled time.

If you just generate a new checksum file you might miss a corrupt existing file.

vatterspun commented 7 years ago

So it's necessary to calculate the checksums for all existing files twice

Yeah that's a good point.

This could be resolved by #36 (compare files) if you could import hash lists. That way you could just take your old checksum file and compare it to the new one. You could see what's changed and would only require two discrete checks over a long period of time instead of two consecutive checks. That might be out of scope for the program, but it would be a neat trick.

MrDito commented 7 years ago

You are right, this might be help. Actually, the current workaround is to evaluate for each checksum update which takes more time, to calculate all checksums twice or first to edit checksum list manually (to update checksum list) and calculate all checksums once (to check files).

I would like to help implementing a more elegant solution for this issue once I've got a bit more time.