예제 #1
0
 internal LZWStream(Stream inputStream, PredictorParameters predictorParam, LZWParameters lzwParam)
 {
     _inputStream = new LZWInputStream(inputStream, lzwParam.EarlyChange);
     if (predictorParam.Predictor != 1)
     {
         _inputStream = new PredictorStream(_inputStream, predictorParam);
     }
 }
예제 #2
0
        internal FlateStream(Stream inputStream, PredictorParameters param)
        {
            inputStream.ReadByte();
            inputStream.ReadByte();

            _inputStream = new DeflateStream(inputStream, CompressionMode.Decompress, true);
            if (param.Predictor != 1)
            {
                _inputStream = new PredictorStream(_inputStream, param);
            }

            _eof = false;
        }
예제 #3
0
        internal PredictorStream(Stream inputStream, PredictorParameters param)
        {
            _inputStream = inputStream;
            setPredictor(param.Predictor);
            setBitsPerComponent(param.BitsPerComponent);
            setColors(param.Colors);
            _width = param.Columns;
            _bpp   = Math.Max(1, numBytesToHoldBits(_numComponents * _bitsPerComponent));

            int bufSize = numBytesToHoldBits(_width * _numComponents * _bitsPerComponent);

            _aboveBuffer = new byte[bufSize];
            _buffer      = new byte[bufSize];
        }