public void Should_be_able_to_compress_and_decompress_using_gzip()
        {
            var algorithm = new GZipCompressionAlgorithm();

            const string text = "gzip compression algortihm|gzip compression algortihm|gzip compression algortihm|gzip compression algortihm|gzip compression algortihm|gzip compression algortihm|gzip compression algortihm";

            Assert.AreEqual(text, Encoding.UTF8.GetString(algorithm.Decompress(algorithm.Compress(Encoding.UTF8.GetBytes(text)))));
        }
示例#2
0
        public void Should_be_able_to_compress_and_decompress_using_gzip()
        {
            var algorithm = new GZipCompressionAlgorithm();

            const string text = "gzip compression algorithm";

            AssertAlgorithm(algorithm, text);
        }
        public void Should_be_able_to_compress_and_decompress_using_gzip()
        {
            var algorithm = new GZipCompressionAlgorithm();

            const string text =
                "gzip compression algortihm|gzip compression algortihm|gzip compression algortihm|gzip compression algortihm|gzip compression algortihm|gzip compression algortihm|gzip compression algortihm";

            Assert.AreEqual(text, Encoding.UTF8.GetString(algorithm.Decompress(algorithm.Compress(Encoding.UTF8.GetBytes(text)))));
        }