public void StoredNonSeekableConvertToDeflate() { var ms = new MemoryStreamWithoutSeek(); var outStream = new ZipOutputStream(ms); outStream.SetLevel(8); Assert.AreEqual(8, outStream.GetLevel(), "Compression level invalid"); var entry = new ZipEntry("1.tst"); entry.CompressionMethod = CompressionMethod.Stored; outStream.PutNextEntry(entry); Assert.AreEqual(0, outStream.GetLevel(), "Compression level invalid"); AddRandomDataToEntry(outStream, 100); entry = new ZipEntry("2.tst"); entry.CompressionMethod = CompressionMethod.Deflated; outStream.PutNextEntry(entry); Assert.AreEqual(8, outStream.GetLevel(), "Compression level invalid"); AddRandomDataToEntry(outStream, 100); outStream.Close(); }