2020-07-16 01:22 PM
Hi All,
I am using STM32F429ZIT6 MCU. And we were planning to zip the assets and unzip them inside MCU. Please can anyone suggest the best starting point for good libraries which can do this.
Thanks,
krishna
2020-07-16 02:01 PM
Take a look at LZ4: https://lz4.github.io/lz4/
2020-07-16 02:33 PM
You can use the Lempel Ziv , however you will need to restrict the dictionary size (Most important step). If the dictionary expand without limits your searching time in the compress table expand too. Try to restrict your dictionary below 2k bytes for MCUs like this. The compression will be proportional with the entropy of your signal.
2020-07-16 02:49 PM
OP specifically mentioned ZIP, because PKZIP is such a standard.
Built some unpacking tools in the past, Mark Adler's Inflate code works for a substantial portion of files, Phil Katz also documented one of the earlier algos, which was easy enough to implement.
I could dig some code up, is there an offer on the table?
2020-07-16 10:31 PM
You are right. On the other hand, LZ4 decompression was implemented in 42 (!) ARM Cortex-M0 assembly instructions, no tables, no malloc, nothing else. https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/lz4-decompression-routine-for-cortex-m0-and-later