3 ms·
No need for that. 30 bits to represent the 13 digit IAN. 3 bytes for prices up to 167772.16. If you frequently buy things more expensive than that, just have
by anoncake 8y ago
No need for that.
30 bits to represent the 13 digit IAN.
3 bytes for prices up to 167772.16. If you frequently buy things more expensive than that, just have one of your servants transcribe the recipe to your favorite format.
1 byte for the number of items. If you buy more than 255 of one thing, we'll just add another line to the recipe.
That's 60 bits per line item. A QR code holds up to 23,648 bits. That makes up to 394 line items per QR code, without compression, which ought to be enough for anyone.
If you do buy more than that, the POS crashes^H prints another QR code.
- fwip 8y agoThat sounds solid, thanks for the detailed breakdown.
- uponcoffee 8y ago>3 bytes for prices up to 167772.16. If you frequently buy things more expensive than that, just have one of your servants transcribe the recipe to your favorite format. >1 byte for the number of items. If you buy more than 255 of one thing, we'll just add another line to the recipe. You could split prices greater than 167772.16 into chunks, delimited by using zero for the number of items in the subseqent line items.
- anoncake 8y agoI think it's simpler to make the field variable length. The same is necessary for the count field, buying >= 256 grams of something is common.