lnsy-dev / qr-code-element

Simple Pure HTML QR Code
The Unlicense
7 stars 0 forks source link

Allow longer than 1k char links #1

Open lnsy-dev opened 3 years ago

lnsy-dev commented 3 years ago

Allow users to have more than 1k in links. I previous put a limit on the number of characters. I think there was a buffer overflow somewhere. Look into this and fix it.

eagle275 commented 3 years ago

think that has more to do with the encoding ... even for short strings the produced qrcode is already 25 columns x 25 rows - and contains 30% overhead for error-correction if using the "H" . By my rough calculation 25x25x2-30% leaves about 875 bits .. this is the limit for the encoded short string . More characters demand more columns and rows - but according to the license holder - a QR-code's max information content is only about 8000 bit (64x64x2 - 2% errorcorrection = 8028 bit) This leaves just enough room to encode ~ 1024 ASCII characters, UTF8 unicode uses more than 1 bytes for special characters, non-lattin-letters and so on - thus reducing the available number of characters encodable - And I dont think QR-code supports more than 64x64 format.