LZW Implementation