Ejemplo n.º 1
0
 public static string DecompressFromBase64(string base64)
 {
     byte[] bytedata = Convert.FromBase64String(base64);
     GawdCompressor packer = new GawdCompressor();
     //byte[] unpacked = packer.Compress(bytedata);
     byte[] unpacked = packer.Decompress(bytedata);
     string unpackedString = ASCIIEncoding.Default.GetString(unpacked);
     return unpackedString;
 }
Ejemplo n.º 2
0
        public static string CompressToBase64(string dataToCompress)
        {
            byte[] byteData = ASCIIEncoding.Default.GetBytes(dataToCompress);
            GawdCompressor packer = new GawdCompressor();
            byte[] packed = packer.Compress(byteData);
            string base64 = Convert.ToBase64String(packed);

            return base64;
        }
Ejemplo n.º 3
0
        public static string CompressToBase64(string dataToCompress)
        {
            byte[]         byteData = ASCIIEncoding.Default.GetBytes(dataToCompress);
            GawdCompressor packer   = new GawdCompressor();

            byte[] packed = packer.Compress(byteData);
            string base64 = Convert.ToBase64String(packed);

            return(base64);
        }
Ejemplo n.º 4
0
        public static string DecompressFromBase64(string base64)
        {
            byte[]         bytedata = Convert.FromBase64String(base64);
            GawdCompressor packer   = new GawdCompressor();

            //byte[] unpacked = packer.Compress(bytedata);
            byte[] unpacked       = packer.Decompress(bytedata);
            string unpackedString = ASCIIEncoding.Default.GetString(unpacked);

            return(unpackedString);
        }