/// <summary>
 /// Creates a new DeflaterOutputStream with the given Deflater and
 /// buffer size.
 /// </summary>
 /// <param name="baseOutputStream">
 /// the output stream where deflated output should be written.
 /// </param>
 /// <param name="defl">
 /// the underlying deflater.
 /// </param>
 /// <param name="bufsize">
 /// the buffer size.
 /// </param>
 /// <exception cref="System.InvalidOperationException">
 /// if bufsize isn't positive.
 /// </exception>
 public DeflaterOutputStream(Stream baseOutputStream, Deflater defl, int bufsize)
 {
     this.baseOutputStream = baseOutputStream;
     if (bufsize <= 0) {
         throw new InvalidOperationException("bufsize <= 0");
     }
     buf = new byte[bufsize];
     def = defl;
 }
 /// <summary>
 /// Creates a new DeflaterOutputStream with the given Deflater and
 /// default buffer size.
 /// </summary>
 /// <param name="baseOutputStream">
 /// the output stream where deflated output should be written.
 /// </param>
 /// <param name="defl">
 /// the underlying deflater.
 /// </param>
 public DeflaterOutputStream(Stream baseOutputStream, Deflater defl)
     : this(baseOutputStream, defl, 512)
 {
 }