qr-backup is designed to save to paper, and restore from the command-line.
but, it's possible that someday we might lose all the nice infrastructure we have today.
- you want to restore your backup, but you're poor and don't have an internet connection
- no one runs "unix" any more. we just have neural meshes
- it's been 50 years and you can't figure out how to install all these programs no one has heard of like "zbar" and "qr-backup"
- your country has become a totalitarian state, and you can't be seen downloading "archiving" programs.
- you are a lizard-person who has recovered piles of paper from a previous civilization. what secrets could they hold?
who knows! wouldn't it be great if you could still restore?
this feature request is to add a printable, 1-page C program which you can type in by hand, compile, and use to restore backups from an image.
This is a very difficult technical challenge in minimization. You should provide a 3-page (6KB) version of the program described below. If you can make a compelling argument this can't be done in 6KB, I will accept a program that looks as short as possible.
Write a C program capable of restoring a set of QR codes from one or more black-and-white PPM format images. You can use ascii or binary, whichever is easier for you. The program should have no dependencies other than the standard library. Only use "normal code" (compile on normal compilers in strict mode).
It will need to do all the steps listed in the FAQ:
- Read QR codes
- Sort them, remove duplicates
- Base64 decode
- Erasure coding
- Append and truncate
- Decrypt (take note!)
- Decompress
- Print SHA256 checksum
qr-backup actually prints a bash one-liner to do the restore, if you prefer to reference that. the one-liner omits erasure coding, which still needs to be done.
Each of the steps is done by qr-backup in the most standard way possible. Decompression calls zcat, for example. You should be able to re-use existing code easily, the challenge is just to shrink it.
Please do submit a readable version of the program, too. Both versions must be licensed CC0 before the bounty is paid.
Bounty:
- Fame and everlasting glory
- 5 hours of my time in trade.
- Bonuses if it would work on a computer+compiler from 1980.
- Bonuses if you can fit it in 1 or 2 pages.
qr-backup is designed to save to paper, and restore from the command-line.
but, it's possible that someday we might lose all the nice infrastructure we have today.
who knows! wouldn't it be great if you could still restore?
this feature request is to add a printable, 1-page C program which you can type in by hand, compile, and use to restore backups from an image.
This is a very difficult technical challenge in minimization. You should provide a 3-page (6KB) version of the program described below. If you can make a compelling argument this can't be done in 6KB, I will accept a program that looks as short as possible.
Write a C program capable of restoring a set of QR codes from one or more black-and-white PPM format images. You can use ascii or binary, whichever is easier for you. The program should have no dependencies other than the standard library. Only use "normal code" (compile on normal compilers in strict mode).
It will need to do all the steps listed in the FAQ:
qr-backup actually prints a bash one-liner to do the restore, if you prefer to reference that. the one-liner omits erasure coding, which still needs to be done.
Each of the steps is done by qr-backup in the most standard way possible. Decompression calls
zcat, for example. You should be able to re-use existing code easily, the challenge is just to shrink it.Please do submit a readable version of the program, too. Both versions must be licensed CC0 before the bounty is paid.
Bounty: