LZW compression/decompression under low memory conditions

前端 未结 8 1213
Happy的楠姐
Happy的楠姐 2020-12-14 05:13

Can anybody give pointers how I can implement lzw compression/decompression in low memory conditions (< 2k). is that possible?

8条回答
  •  死守一世寂寞
    2020-12-14 05:35

    If the choice of compression algorithm isn't set in stone, you might try gzip/LZ77 instead. Here's a very simple implementation I used and adapted once:

    ftp://quatramaran.ens.fr/pub/madore/misc/myunzip.c

    You'll need to clean up the way it reads input, error handling, etc. but it's a good start. It's probably also way too big if your data AND code need to fit in 2k, but at least the data size is small already.

    Big plus is that it's public domain so you can use it however you like!

提交回复
热议问题