4 ms·
You could include a hash of the correct data, which would tell you in the (cosmically) vast majority of cases when your data has been corrupted.
by sp332 4y ago
You could include a hash of the correct data, which would tell you in the (cosmically) vast majority of cases when your data has been corrupted.
- defrost 4y agoIndeed. That is, however, error detection and not error correction. Once an error is detected you can apply 'correction' to the nearest probably correct value .. which only 'works' for errors under a threshold. Hence the assertion in comment above yours.
- ars 4y agoHow many hashes will you include? A single one for the whole CD? That tells you if you have an error, but not where? A 32 bytes hash for every 32 bytes? Then you double your storage requirements. There are actually WAY better algorithms for this than a hash (a hash is meant to handle secrets and cryptography - it's the wrong thing for this purpose). ECC codes can tell you if the data is bad - and you can choose how many bytes this covers, and that can also fix bad data, again, you can choose how many errors per byte you want. If you are curious: https://en.wikipedia.org/wiki/Error_correction_code https://en.wikipedia.org/wiki/Error_correction_code
- ajsnigrutin 4y agoFor ripping, would it matter? It's probably not a feature that was needed back in time when audio CDs were designed, but in retrospective, getting a notification "bit error was detected when ripping, not sure where, but now you know" would help preservers - they could then find another copy of the CD and get a 100% accurate digital copy of the song (within limits of hashing algos of course).
- jefftk 4y ago> a hash is meant to handle secrets and cryptography - it's the wrong thing for this purpose The rest of your comment is good, but I wanted to quibble with this: hashing is useful for a very wide range of things, and are one of the main building blocks of modern algorithms (hash tables being the best know).
- rawoke083600 4y ago>How many hashes will you include? A single one for the whole CD? That tells you if you have an error, but not where? Interesting ! At what point with today's high-capacity-disks (DVD etc), can we just say store the data x3 and take the value of the closest two ? If the only thing we really want is "high-audio-accuracy" ?