miniz compression
Posted: Sat Mar 02, 2024 12:30 am
Hi. I am trying to compress some Lua source code and store it in flash memory. Anything I tried didn't work. Eventually I found the issue (ChatGPT was not completly useless for once ) and got it working. The issue was I had a stack overflow. Enabling PSRAM and allocating on heap fixed it. Apparently the tdefl_compressor has a size of 167744 bytes (168kB). I am not well versed in compression algorithms but this seems extremly high to me. Even after I skimmed the miniz.h definitions I think the structure should be smaller than 100kB (which also seems a lot to me).
So is this normal? Am I doing something wrong? Is there an easier way to compress text? I have spent hours on this already and I am at a loss.
So is this normal? Am I doing something wrong? Is there an easier way to compress text? I have spent hours on this already and I am at a loss.