Exemplo n.º 1
0
        public void Deflate_WithOffsetAndCount_Bytes()
        {
            byte[] data     = new byte[] { 255, 255, 255, 255 };
            byte[] expected = new byte[] { 251, 255, 31, 0 };
            byte[] deflated = ZLibUtils.Deflate(data, 1, 2);

            Assert.True(expected.SequenceEqual(deflated));
        }
Exemplo n.º 2
0
 public void DeflateInflate_WithOffsetAndCount_Bytes()
 {
     byte[] data = ArrayUtils.CreateArray((byte)255, 100);
     Assert.True(data.Skip(10).Take(80).SequenceEqual(ZLibUtils.Inflate(ZLibUtils.Deflate(data, 10, 80))));
 }