Ejemplo n.º 1
0
        public void TestInit()
        {
            Stream      baseStream = new MemoryStream();
            GZipStream  gzipStream = new GZipStream(baseStream, CompressionMode.Decompress);

            Assert.AreSame(baseStream, gzipStream.BaseStream);

            gzipStream.Close();
        }
Ejemplo n.º 2
0
        public void TestDecompress()
        {
            Stream      baseStream = new MemoryStream(this.compressedData);
            GZipStream  gzipStream = new GZipStream(baseStream, CompressionMode.Decompress);

            StreamReader reader = new StreamReader(gzipStream);

            string  data = reader.ReadToEnd();

            Assert.AreEqual(Data, data);

            gzipStream.Close();
        }