An implementation of LZW algorithm