public void CompatibilityCompressUInt8ArrayFromCSharp(LZStringTestCase test)
        {
            var compress   = LZString.CompressToUint8Array(test.Uncompressed);
            var uncompress = test.Uncompressed;

            Assert.That(uncompress, Is.EqualTo(test.Uncompressed));
        }
        public void CompatibilityDecompressUInt8ArrayFromNode(LZStringTestCase test)
        {
            var compress   = test.CompressedUInt8Array;
            var uncompress = LZString.DecompressFromUint8Array(compress);

            Assert.That(uncompress, Is.EqualTo(test.Uncompressed));
        }
        public void CompatibilityCompressUTF16FromCSharp(LZStringTestCase test)
        {
            var compress   = LZString.CompressToUTF16(test.Uncompressed);
            var uncompress = RunNodeLzString("decompressFromUTF16", compress);

            Console.WriteLine("c# compression result:");
            Console.WriteLine(compress);
            Assert.That(uncompress, Is.EqualTo(test.Uncompressed));
        }
        public void CompatibilityDecompressEncodedURIComponentFromNode(LZStringTestCase test)
        {
            var compress   = RunNodeLzString("compressToEncodedURIComponent", test.Uncompressed);
            var uncompress = "";

            try
            {
                uncompress = LZString.DecompressFromEncodedURIComponent(compress);
            }
            catch (FormatException exc)
            {
                Assert.Fail($"Invalid EncodedURIComponent string: '{compress}'{Environment.NewLine}{exc.Message}");
            }
            Console.WriteLine("lz-string compression result:");
            Console.WriteLine(compress);
            Assert.That(uncompress, Is.EqualTo(test.Uncompressed));
        }
 public void DecompressFromEncodedURIComponent(LZStringTestCase test)
 {
     Assert.That(LZString.DecompressFromEncodedURIComponent(test.CompressedEncodedURIComponent), Is.EqualTo(test.Uncompressed));
 }
 public void DecompressFromUTF16(LZStringTestCase test)
 {
     Assert.That(LZString.DecompressFromUTF16(test.CompressedUTF16), Is.EqualTo(test.Uncompressed));
 }
 public void CompressToUTF16(LZStringTestCase test)
 {
     Assert.That(LZString.CompressToUTF16(test.Uncompressed), Is.EqualTo(test.CompressedUTF16));
 }
 public void DecompressFromBase64(LZStringTestCase test)
 {
     Assert.That(LZString.DecompressFromBase64(test.CompressedBase64), Is.EqualTo(test.Uncompressed));
 }
 public void CompressToBase64(LZStringTestCase test)
 {
     Assert.That(LZString.CompressToBase64(test.Uncompressed), Is.EqualTo(test.CompressedBase64));
 }
        public void CompatibilityCompressUInt8ArrayFromCSharp(LZStringTestCase test)
        {
            var compress = LZString.CompressToUint8Array(test.Uncompressed);

            CollectionAssert.AreEqual(compress, test.CompressedUInt8Array);
        }