Esempio n. 1
0
 public void TestPackAndUnpack()
 {
     byte[] orig   = new byte[] { 122, 34, 67, 89, 34, 10, 10, 67, 56, 122, 122, 10, 0, 34, 56, 12 };
     byte[] zipped = DataZip.PackData(orig);
     Assert.IsTrue(orig != zipped);
     byte[] unzipped = DataZip.UnpackData(zipped);
     Assert.AreEqual(orig.Length, unzipped.Length);
     for (int i = 0; i < orig.Length; i++)
     {
         Assert.AreEqual(orig[i], unzipped[i]);
     }
 }
Esempio n. 2
0
 public void TestUnpackNull()
 {
     Assert.IsNull(DataZip.UnpackData(null));
 }