public void Should_be_able_to_compress_and_decompress_using_deflate()
        {
            var algorithm = new DeflateCompressionAlgorithm();

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

            Assert.AreEqual(text, Encoding.UTF8.GetString(algorithm.Decompress(algorithm.Compress(Encoding.UTF8.GetBytes(text)))));
        }
        public void Should_be_able_to_compress_and_decompress_using_deflate()
        {
            var algorithm = new DeflateCompressionAlgorithm();

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

            Assert.AreEqual(text, Encoding.UTF8.GetString(algorithm.Decompress(algorithm.Compress(Encoding.UTF8.GetBytes(text)))));
        }
        /// <summary>
        /// Decompress .drawio file
        /// </summary>
        /// <param name="drawio"></param>
        /// <returns></returns>
        public static string Decompress(string encoded)
        {
            var base64String = Convert.FromBase64String(encoded);
            var algorithm    = new DeflateCompressionAlgorithm();
            var deflated     = algorithm.Decompress(base64String);
            var endodedUri   = Encoding.UTF8.GetString(deflated);
            var xml          = Uri.UnescapeDataString(endodedUri);

            return(xml);
        }