4 ms·
Thanks. This is the first library I've seen where compression can be done on the micro. I was looking for something like this to compress recorded data so it wo
by FigBug 14y ago
Thanks. This is the first library I've seen where compression can be done on the micro. I was looking for something like this to compress recorded data so it would take less time to transfer. Since then I've increased my transfer speeds and I'm not sure I still want to bother with the compression. I worry it'll make it a lot harder to debug and missing blocks of data could become a huge problem.
However, I am putting images in my code space. I was thinking about RLEing them, but I'll see if this works better.
- silentbicycle 14y agoFor what it's worth, you can put only the compressor or decompressor on the micro. I'm still working on the documentation. IME, it works particularly well on bitmapped images and sparse sensor data. Also, it can be faster to incrementally read and unpack compressed data from slow storage (such as flash memory) than to read the whole uncompressed data set. I'm decompressing from flash memory directly into video RAM.
- silentbicycle 14y agoAlso, if your window size is greater than 2^8 and you can afford an extra 2 x window_size bytes, the optional indexing greatly increases the compression speed over normal LZSS; the typical linear scan for every byte really hurts as the window gets larger. The index construction is O(N) in the window size for both time and space, which should be doable on many systems. It doesn't change the fundamental algorithm, just speeds up the compression's pattern detection.