Reduce RAM usage
Thank you for providing this lib to the community. I'm trying to use this library into a RC remote controller that uses lua script. It complains for the RAM usage.
Is there any way to reduce RAM usage?
I have no idea how to reduce RAM usage. I use this library on a laptop with plenty RAM so I have never had the need to look at that.
The big arrays are the one that occupies ram. Could you simplify the qr code generation by removing advanced options? Or maybe by removing the big declared tables?
How much size do the arrays take? I assume that the cclxvi table takes up most space and can be calculated on the fly. The other tables? I am not really sure how to calculate those.
FYI: I've done the optimization and created an EdgeTX script based on this lib: https://github.com/alufers/edgetx-gps-qrcode
Here are is the outline of the modifications I had to make to make it run on the STM32 embedded in my radio: https://github.com/alufers/edgetx-gps-qrcode/blob/master/gps_qr.src.lua#L9
TL;DR: I had to remove almost everything not used for generating a binary QR code with the L error correction, and code-golf it to minimize the RAM usage. Additionally I run the script through a minifier.
The modifications remove useful features, so I would not want to contribute them here.
Thank you very much @alufers for the work! I'll close this issue, since your changes do not go back into this repository