Re:Why are QR Codes with capital letters smaller than QR cod...
by josh11b on Wednesday February 26, 2025 @12:36AM
(#43180958)
10^12 < 256^5 ≈ 1.1e+12, which isn't too bad. You could also use 10^118 < 256^49, which wastes less but is in bignum land.
But don't you want 10^x to be slightly bigger than 256^y, so you could represent all length-y byte sequences in x-digit number? In this direction, there's 10^53 > 256^22, but that is still in bignum land.
Re:Why are QR Codes with capital letters smaller than QR cod...
by Dylan16807 on Wednesday February 26, 2025 @01:32AM
(#43181269)
Yeah, use a bignum. QR codes are not very big.
And while 3% overhead is fine, encoding decimal digits in groups of 3 is only 0.3% plus a couple bits to round up to the nearest digit.
[1] 32 original bits = 4 original bytes = 6 base45-encoded letters = 33 bits in the alphanumeric mode, so the overhead is 1 - 33/32 = 0.03125 for 4n bytes of data.