Ejemplo n.º 1
0
        public MySqlStream(Stream baseStream, Encoding encoding, bool compress)
            : this(encoding)
        {
            timedStream = new TimedStream(baseStream);
            Stream stream;
            if (compress)
                stream = new CompressedStream(timedStream);
            else
                stream = timedStream;

            inStream = new BufferedStream(stream);
            outStream = stream;
        }
Ejemplo n.º 2
0
        public MySqlStream(Stream baseStream, Encoding encoding, bool compress)
            : this(encoding)
        {
            timedStream = new TimedStream(baseStream);
            Stream stream;
            if (compress)
                stream = new CompressedStream(timedStream);
            else
                stream = timedStream;

            inStream = new MemoryStream();
            var p = stream.Position;
            stream.CopyTo(inStream);
            stream.Position = p;
            outStream = stream;
        }
        public MySqlStream(Stream baseStream, Encoding encoding, bool compress)
            : this(encoding)
        {
            timedStream = new TimedStream(baseStream);
            Stream stream;
            if (compress)
            {
                stream = new CompressedStream(timedStream);
            }
            else
            {
                stream = timedStream;
            }

            inStream = new MemoryStream();
            var p = stream.Position;
            stream.CopyTo(inStream);
            stream.Position = p;
            outStream       = stream;
        }