public void TestNotSupported() { Stream baseStream = new MemoryStream(this.compressedData); GZipStream gzipStream = new GZipStream(baseStream, CompressionMode.Decompress); try { gzipStream.Write(null, 0, 0); } catch (NotSupportedException) {} try { gzipStream.Flush(); } catch (NotSupportedException) {} try { gzipStream.Seek(0, SeekOrigin.Begin); } catch (NotSupportedException) {} try { gzipStream.SetLength(0); } catch (NotSupportedException) {} }