3 ms·
If you stumbled upon this looking for the smallest QR code JS library, it's probably LeanQR [0]. It's under 10kb minified and 5kb compressed. [0] https://qr.da
by KTibow 2y ago
If you stumbled upon this looking for the smallest QR code JS library, it's probably LeanQR [0]. It's under 10kb minified and 5kb compressed.
[0] https://qr.davidje13.com/ https://qr.davidje13.com/
- lifthrasiir 2y agoWhile I didn't never specifically optimize it for the size (unlike some libraries I do), my very old qr.js library [1] seems to be smaller than that, less than 9 KB minified and 4 KB gzipped in my brief testing. I should note that qr.js never supported the correct Kanji encoding and optimal encoding based on dynamic programming, but otherwise it is functionally complete and I think it can't get much larger than that. There are lots of rooms to cut from there and I will say 5 KB is a fair estimate for the minified size after modest but correctly guided size optimization. [1] https://github.com/lifthrasiir/qr.js https://github.com/lifthrasiir/qr.js (predates the modern JS, but surely more popular than LeanQR I believe)
- KTibow 2y agoHuh. Didn't run in to it when I was searching for libraries. It appears to be just 350 bytes larger than LeanQR when gzipped.