Exemplo n.º 1
0
        public void Decompress()
        {
            var    TestObject = new Corset(new ICompressor[] { new DeflateCompressor(), new GZipCompressor() });
            string Data       = "This is a bit of data that I want to compress";

            Assert.Equal("This is a bit of data that I want to compress", TestObject.Decompress(TestObject.Compress(Data.ToByteArray(), CompressorType.Deflate), CompressorType.Deflate).ToString(null));
        }
Exemplo n.º 2
0
        public void Compress()
        {
            var    TestObject = new Corset(new ICompressor[] { new DeflateCompressor(), new GZipCompressor() });
            string Data       = "This is a bit of data that I want to compress";

            Assert.Equal("CsnILFYAokSFpMwShfw0hZTEkkSFkozEEgVPhfLEvBKFknyF5PzcgqLU4mIAAAAA//8=", Convert.ToBase64String(TestObject.Compress(Data.ToByteArray(), CompressorType.Deflate)));
        }