public void CompressionProducesExpectedOutput()
        {
            var compressed = VbaCompression.Compress(_compressionInputBytes);

            Assert.Equal(_expectedCompressedBytes.Length, compressed.Length);
            Assert.True(_expectedCompressedBytes.SequenceEqual(compressed));
        }
Example #2
0
        public void GivenLargeByteSequenceWithLowCompressibilityCompressingAndDecompressionProducesSameInput()
        {
            var data = GetLargeByteSequenceWithLowCompressibility().ToArray();

            var compressedData = VbaCompression.Compress(data);
            var convertedData  = VbaCompression.Decompress(compressedData);

            Assert.True(data != convertedData);
            Assert.True(data.LongLength == convertedData.LongLength);
            Assert.True(data.SequenceEqual(convertedData));
        }