040
Daily Dose of Curious
HOW IT WORKS
040
Daily Dose of Curious
HOW IT WORKS
The level of correction is chosen when the code is made — from about seven per cent of symbols recoverable up to about thirty. The higher levels are why a code with a logo printed over the middle of it still works, and why a code printed small for a label is often set to the highest level it can afford.
Because a good deal of what is printed is not the message. Extra symbols are added when the code is made, and they carry enough information to rebuild whatever the damage took away.
The three large squares in the corners tell it where the code is, which way up it is and how it is distorted by the angle you are holding the camera at.
The message is not laid down in one place. It is cut into blocks and interleaved across the whole symbol, so neighbouring dots usually belong to different blocks.
Each block is stored with extra symbols computed from it. They are not a copy; they are enough information to work out what is missing.
Reed-Solomon arithmetic reconstructs the lost symbols from the survivors, as long as no block lost more than the check symbols can cover.
The clever bit
Interleaving is what makes the damage survivable. A blot that would destroy one block outright instead takes a little from many, and a little from many is exactly what the correction is good at. Spreading the data out is what turns one fatal wound into several recoverable scratches.
This one is not an opinion. It is how the thing works, and these are what that rests on.