How can the LZW output sequence be improved to achieve higher compression? Are there any specific methods? (I am applying LZW compression on a text file)
LZW compression on text
1.2k views Asked by user4345738 At
2
There are 2 answers
0
On
You can try a variable-bit length:http://en.m.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Welch.
LZW is one quite specific compression algorithm, which was a significant milestone in the history of compression algorithms, but more due to its relative simplicity and speed than due to its compression ratio. LZW also has the advantage that it is a single-pass algorithm, making it a good choice for real-time compression in hardware. However, several newer algorithms e.g. Deflate (ZIP) have better compression ratios.
Standard LZW can be tweaked in a number of ways to achieve better compression performance mainly by expanding the size of the dictionary and also by reusing dictionary space occupied by rarely or never used strings, but it's probably a lot easier to just switch to one of the more recent algorithms, like ZIP or BZIP2.