4 ms·
Checksums are also a pain for larger files. If a 4GB movie has a checksum, is the app supposed to read all the file in to calculate and validate the checksum pr
by joosters 7y ago
Checksums are also a pain for larger files. If a 4GB movie has a checksum, is the app supposed to read all the file in to calculate and validate the checksum prior to playing the movie? That’s inefficient.
It also doesn’t help programs dealing with bad data. Apps still must handle invalid files gracefully, even if the checksum is good. Otherwise, hackers can create malicious invalid files with correct checksums.
Checksums also make small edits to a file painful, since every program must now know how to update the checksums. Imagine if text files had checksums - how could you possibly do simple regex replacements, e.g. using ‘sed’?
- pharrington 7y agoRegarding your second thought—one obvious way a checksum helps in gracefully handling invalid files is that a checksum pass/fail decisively rules out with a problem occurred during the data transfer. For example, a checksum always you to know when it is/isn't appropriate to automatically attempt a redownload or tell the user to try to redownload a file.
- deleted 7y ago[deleted]
- colejohnson66 7y ago> Checksums are also a pain for larger files. If a 4GB movie has a checksum, is the app supposed to read all the file in to calculate and validate the checksum prior to playing the movie? That’s inefficient. The page did mention doing it for the header, not the whole file