示例#1
0
        public static byte[] Compress(string input)
        {
            LZW         lzw    = new LZW();
            IList <int> output = lzw.CompressString(input);

            return(lzw.OutputToBytes(output));
        }
示例#2
0
        public static string Decompress(byte[] input)
        {
            LZW         lzw    = new LZW();
            IList <int> output = lzw.BytesToOutput(input);
            string      str    = lzw.DecompressString(output);

            return(str);
        }