Exemplo n.º 1
0
 public StreamPipelineConnection(PipelineFactory factory, Stream stream)
 {
     Input  = factory.CreateReader(stream);
     Output = factory.CreateWriter(stream);
 }
        public static IPipelineReader CreateGZipCompressReader(this PipelineFactory factory, IPipelineReader reader, CompressionLevel compressionLevel)
        {
            var deflater = new WritableDeflateTransform(compressionLevel, ZLibNative.GZip_DefaultWindowBits);

            return(factory.CreateReader(reader, deflater.Execute));
        }
        public static IPipelineReader CreateGZipDecompressReader(this PipelineFactory factory, IPipelineReader reader)
        {
            var inflater = new ReadableDeflateTransform(ZLibNative.GZip_DefaultWindowBits);

            return(factory.CreateReader(reader, inflater.Execute));
        }
        public static IPipelineReader DeflateDecompress(this IPipelineReader reader, PipelineFactory factory)
        {
            var inflater = new ReadableDeflateTransform(ZLibNative.Deflate_DefaultWindowBits);

            return(factory.CreateReader(reader, inflater.Execute));
        }
 public static IPipelineReader GZipCompress(this IPipelineReader reader, PipelineFactory factory, CompressionLevel compressionLevel)
 {
     var deflater = new WritableDeflateTransform(compressionLevel, ZLibNative.GZip_DefaultWindowBits);
     return factory.CreateReader(reader, deflater.Execute);
 }
 public static IPipelineReader GZipDecompress(this IPipelineReader reader, PipelineFactory factory)
 {
     var inflater = new ReadableDeflateTransform(ZLibNative.GZip_DefaultWindowBits);
     return factory.CreateReader(reader, inflater.Execute);
 }