http://bugs.openzim.org/show_bug.cgi?id=26
Summary: CRC check Product: openZIM Version: unspecified Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P3 Component: zimlib AssignedTo: tommi@tntnet.org ReportedBy: emmanuel@engelhart.org CC: dev-l@openzim.org Estimated Hours: 0.0
Downloaded ZIM files are unfortunately not always fully valid at the end of the download stage. Consequently users may have a bad user experience without having a chance to easily check if the file is valid.
It would be great to provide in the zimwriter/zimlib a way to check the zim file integrity easily.
A way to achieve that could be: * At the end of the ZIM file creation process (file is created) compute and append at the end of the file a CRC (md5sum, sha1) * In the zimlib add a method checkIntegrity() or something similar able to compute the CRC from the file (excepting the CRC hash at the end) and make the comparison.
Hash algorithm should be fast and reliable (md5?).