示例#1
0
 public GzipSource(Source source)
 {
     if (source == null)
     {
         throw new ArgumentException("source == null");
     }
     this.inflater       = new Inflater(true);
     this.source         = EasyIO.Buffer(source);
     this.inflaterSource = new InflaterSource(this.source, inflater);
 }
示例#2
0
 public GzipSink(Sink sink)
 {
     if (sink == null)
     {
         throw new ArgumentException("sink == null");
     }
     this.deflater     = new Deflater(Deflater.DEFAULT_COMPRESSION, true /* No wrap */);
     this.sink         = EasyIO.Buffer(sink);
     this.deflaterSink = new DeflaterSink(this.sink, deflater);
     WriteHeader();
 }
示例#3
0
 public DeflaterSink(Sink sink, Deflater deflater) : this(EasyIO.Buffer(sink), deflater)
 {
 }
示例#4
0
 public InflaterSource(Source source, Inflater inflater) : this(EasyIO.Buffer(source), inflater)
 {
 }