LZW compression/decompression under low memory conditions

前端 未结 8 1220
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:52

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

    Why LZW? LZW needs lots of memory. It is based on a hash/dictionary and compression ratio is proportional to the hash/dictionary size. More memory - better compression. Less memory - output can be even larger than input.

    I haven't touched encoding for very long time, but IIRC Huffman coding is little bit better when it comes to memory consumption.

    But it all depends on type of information you want to compress.

提交回复
热议问题