cancel
Showing results for 
Search instead for 
Did you mean: 

want to zip and unzip assets in stm32f4 MCU

Kpodu.1
Associate II

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

4 REPLIES 4
KnarfB
Principal III

Take a look at LZ4: https://lz4.github.io/lz4/

CMart.3
Associate II

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.

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?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

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