Solution for the LZW compression algorithm

http://rosettacode.org/wiki/LZW_compression