Testing LZW algorithm