Пример #1
0
        public void TestRoundTrip()
        {
            var input = new byte[6000];

            for (var i = 0; i < 100; i++)
            {
                input[i] = (byte)i;
            }
            for (var i = 100; i < 6000; i++)
            {
                input[i] = (byte)(i / 10);
            }
            CollectionAssert.AreEqual(input, MiniLzo.Compress(MiniLzo.Decompress(input)));
        }
Пример #2
0
 public static byte[] CompressLZO(this byte[] data)
 {
     using (s_sync.Lock())
         return(s_lzo.Compress(data));
 }