Add string optimizations by Shane32 · Pull Request #521 · Shane32/QRCoder
This PR prevents PlainTextToBinaryByte from encoding the provided string back and forth to the target encoding multiple times. It also caches the encoder for future use, as it is designed to be a singleton. On the .NET Core 5+ TFMs the encoding uses a stack-allocated byte array, reducing heap allocations and memory requirements.
Add tests for UTF8 with and without BOM.
No changes to logic; produced QR codes should be identical to previously for any input.