Skip to main content
Kpodu.1
Associate III
July 16, 2020
Question

want to zip and unzip assets in stm32f4 MCU

  • July 16, 2020
  • 4 replies
  • 4074 views

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

This topic has been closed for replies.

4 replies

KnarfB
Super User
July 16, 2020

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

CMart.3
Associate II
July 16, 2020

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.

Tesla DeLorean
Guru
July 16, 2020

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
KnarfB
Super User
July 17, 2020

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