Exemple #1
0
        protected override void Dispose(bool disposing)
        {
            if (!Disposed)
            {
                if (disposing)
                {
                    _keyClockDecoder?.Dispose();
                    _clientDecoder?.Dispose();
                    _leftClockDecoder?.Dispose();
                    _rightClockDecoder?.Dispose();
                    _infoDecoder?.Dispose();
                    _stringDecoder?.Dispose();
                    _parentInfoDecoder?.Dispose();
                    _typeRefDecoder?.Dispose();
                    _lengthDecoder?.Dispose();
                }

                _keyClockDecoder   = null;
                _clientDecoder     = null;
                _leftClockDecoder  = null;
                _rightClockDecoder = null;
                _infoDecoder       = null;
                _stringDecoder     = null;
                _parentInfoDecoder = null;
                _typeRefDecoder    = null;
                _lengthDecoder     = null;
            }

            base.Dispose(disposing);
        }
Exemple #2
0
        public UpdateDecoderV2(Stream input, bool leaveOpen = false)
            : base(input, leaveOpen)
        {
            _keys = new List <string>();

            // Read feature flag - currently unused.
            Reader.ReadByte();

            _keyClockDecoder   = new IntDiffOptRleDecoder(Reader.ReadVarUint8ArrayAsStream());
            _clientDecoder     = new UintOptRleDecoder(Reader.ReadVarUint8ArrayAsStream());
            _leftClockDecoder  = new IntDiffOptRleDecoder(Reader.ReadVarUint8ArrayAsStream());
            _rightClockDecoder = new IntDiffOptRleDecoder(Reader.ReadVarUint8ArrayAsStream());
            _infoDecoder       = new RleDecoder(Reader.ReadVarUint8ArrayAsStream());
            _stringDecoder     = new StringDecoder(Reader.ReadVarUint8ArrayAsStream());
            _parentInfoDecoder = new RleDecoder(Reader.ReadVarUint8ArrayAsStream());
            _typeRefDecoder    = new UintOptRleDecoder(Reader.ReadVarUint8ArrayAsStream());
            _lengthDecoder     = new UintOptRleDecoder(Reader.ReadVarUint8ArrayAsStream());
        }