nayuki/QR-Code-generator — reverse-engineered prompt
Reverse engineered prompt
Build me a clean QR code generator library and small demo that works across common languages, with the main version in Java and matching versions for JavaScript or TypeScript, Python, Rust, C plus plus, and C if practical.
I want a user to be able to type text or pass in data, choose the error correction level, and get back the raw black and white QR modules so they can draw it however they want. It should support normal QR Code Model 2 sizes, automatically pick the smallest size that fits, choose the best mask by default, and allow advanced users to set version ranges, mask pattern, and segment data manually.
Please include a simple example that turns “Hello, world!” into a PNG, plus lower level examples that loop over the QR pixels. Keep the code compact, readable, well commented, and correct rather than flashy. Use the MIT license, and look up current QR code details online if you need to.
Want more depth? Deep Reverse