问题
I need a proven compression library for ARM cortex M3 or 4. I will use this library for compressing some data from the peripherals before shipping out of the IC.
Any pointers would be appreciated. I have so far looked at LZ4c but it is not easy to get it working on ARM.
回答1:
I really like BCL, it is a light weight, easy to integrate library. I've used it on Cortex M3 and M4 parts.
回答2:
https://github.com/pfalcon/uzlib is highly optimized, minimal library (based on the earlier tinf library), which works with the standard DEFLATE/zlib/gzip compression. It can work in both memory buffer and streaming mode for decompression (in the latter case it can process files of unlimited size). For compression, it implements a simpler compression algorithm, but still formats result as a zlib compatible bitstream, so any other software can decompress it.
The library wouldn't have any problems running on Cortex-M0 (depending on dictionary size used, for small-RAM systems, values less than default 32KB should be used).
It's used in MicroPython https://github.com/pfalcon/micropython , where with ~40KB of free RAM, an application written in Python can download tarballs over TLS connection and decompress them into the filesystem (the "upip" package manager).
回答3:
If you have a standard C compiler, you have many choices. zlib, lz4, libbzip2, lzma.
回答4:
I have spent some time to integrate LZ4. It is a nice one, 20KB data is compressed in 0.5mSec using an ARM Cortex M4. Stack requirement is about 16Kb (configurable down to 4). Good one.
来源:https://stackoverflow.com/questions/11574081/compression-libraries-for-arm-cortex-m3-4