After much testing. It is finished. It fits 8K characters, 100 characters per ro...

@meluzzy@woof.tech

After much testing. It is finished.

It fits 8K characters, 100 characters per row.
Which is enough to store 4KB of raw data.
I had to resort to hexadecimal instead of base64 or base32. And I had to use an alternative set of glyphs for the hex digits so that tesseract was able to parse it on a single pass.

It uses "IO2JYSL7XNABCPEV"; A set I came up with after testing which limited set of characters caused the least amount of mistakes on the legacy tesseract English model using common fonts.

Sadly. It doesn't have any error-correction system. I was going to use parity files but they have a huge header (about 64KB) that makes them unfit for it. In the end I resorted to printing the back of the paper with the same data but using the font: "Atkinson Hyperlegible Mono" instead of OCR-B.

(Ironically, all the models I tried, even the ones made for MRZ and OCR-B specifically, worked really well with this other font. Including the default English and script/Latin models.)

This one has an encrypted .zip with my private pgp key on it.

At the end of the file there is a simple "header" with the checksum of the contained file, the size of the file / the amount of characters divided by 2, the name of the file and its extension, and finally: the encoding used in case I forget.