Built to the QR spec: automatic mode selection (numeric, alphanumeric, or UTF-8 byte), the smallest version that fits, Reed–Solomon error correction, and the lowest-penalty data mask. Higher error correction makes the code denser but lets it still scan if part is damaged, dirty, or covered by a logo. Dark-on-light scans best — keep good contrast. Verified module-for-module against a reference encoder.