コード例 #1
0
 /// <summary>
 ///   Create a <c>DeflateStream</c> and explicitly specify whether the
 ///   stream should be left open after Inflation.
 /// </summary>
 ///
 /// <remarks>
 ///
 /// <para>
 ///   This constructor allows the application to request that the captive stream
 ///   remain open after the inflation occurs.  By default, after
 ///   <c>Close()</c> is called on the stream, the captive stream is also
 ///   closed. In some cases this is not desired, for example if the stream is a
 ///   memory stream that will be re-read after compression.  Specify true for
 ///   the <paramref name="leaveOpen"/> parameter to leave the stream open.
 /// </para>
 ///
 /// <para>
 ///   The <c>DeflateStream</c> will use the default compression level.
 /// </para>
 ///
 /// <para>
 ///   See the other overloads of this constructor for example code.
 /// </para>
 /// </remarks>
 ///
 /// <param name="stream">
 ///   The stream which will be read. This is called the
 ///   "captive" stream in other places in this documentation.
 /// </param>
 ///
 /// <param name="leaveOpen">true if the application would like the stream to
 /// remain open after inflation.</param>
 public DeflateStream(System.IO.Stream stream, bool leaveOpen)
 {
     _baseStream = new ZlibBaseStream(stream, ZlibStreamFlavor.DEFLATE, leaveOpen);
 }
コード例 #2
0
ファイル: DeflateStream.cs プロジェクト: Zolniu/DigitalRune
 /// <summary>
 ///   Create a <c>DeflateStream</c> and explicitly specify whether the
 ///   stream should be left open after Inflation.
 /// </summary>
 ///
 /// <remarks>
 ///
 /// <para>
 ///   This constructor allows the application to request that the captive stream
 ///   remain open after the inflation occurs.  By default, after
 ///   <c>Close()</c> is called on the stream, the captive stream is also
 ///   closed. In some cases this is not desired, for example if the stream is a
 ///   memory stream that will be re-read after compression.  Specify true for
 ///   the <paramref name="leaveOpen"/> parameter to leave the stream open.
 /// </para>
 ///
 /// <para>
 ///   The <c>DeflateStream</c> will use the default compression level.
 /// </para>
 ///
 /// <para>
 ///   See the other overloads of this constructor for example code.
 /// </para>
 /// </remarks>
 ///
 /// <param name="stream">
 ///   The stream which will be read. This is called the
 ///   "captive" stream in other places in this documentation.
 /// </param>
 ///
 /// <param name="leaveOpen">true if the application would like the stream to
 /// remain open after inflation.</param>
 public DeflateStream(System.IO.Stream stream, bool leaveOpen)
 {
     _baseStream = new ZlibBaseStream(stream, ZlibStreamFlavor.DEFLATE, leaveOpen);
 }