Métriques du dépôt
- Stars
- (86 stars)
- Métriques de merge PR
- (Métriques PR en attente)
Description
The "qrcode.js" library bundled in here requires its data to be provided as text, which is why this library currently expects a string OR an object that can be JSON.stringify(..)'d.
However, this can (depending on presence of unicode characters in the string), result in incorrect/buggy internal string length computations inside that library, which leads to exceptions in some cases. Ugh.
A "fix" to work around this was sketched out by me here. It provides a better way of interacting with this library, to push in arbitrary byte data rather than strings.
So qr-data-sync should change to use that patch and push its stuff in binary as well. Should avoid any potential unicode issues.
This won't be a breaking change at all to fix that bug. It may bump the "version" of the frame encoding.
But additionally, the public API will be extended so you can pass in a Uint8Array instance if you want to use this library to chunk up arbitrary binary data -- like an image! -- (without having to go through the mess and size bloat of base64 encoding it to a string first).