1
votes

I have stream of binary data that I want to 'decompress' at run-time. The data is compressed off-target so there is no constraint on compression in time/space. When it comes to decompression at run-time I need to be able to save memory not only by decompressed data but also the decompression code size should not exceed more than around 10KB.

Any suggestions on the kinds of simple decompression algorithms/ libraries in C? I am ready to compromise on compression ratio for data, also in time for decompression.

2

2 Answers

4
votes

Try lz4. About 2K bytes of code for decompression, and wicked fast.

1
votes

I would recommend LZO Compression. I have used it very successfully. It has excellent decompression speed (that's what its optimized for) and some implementations can even decompress into the same buffer where the data is stored (if its stored at the end).