Ejemplo n.º 1
0
            internal virtual bool ReadSequence()
            {
                if (@in.Eof)
                {
                    wordNum = int.MaxValue;
                    return(false);
                }
                int token = @in.ReadByte() & 0xFF;

                if ((token & (1 << 7)) == 0)
                {
                    int cleanLength = ReadCleanLength(@in, token);
                    wordNum += cleanLength;
                }
                else
                {
                    allOnesLength = ReadCleanLength(@in, token);
                }
                dirtyLength = ReadDirtyLength(@in, token);
                if (Debugging.AssertsEnabled)
                {
                    Debugging.Assert(@in.Length - @in.Position >= dirtyLength, "{0} {1} {2}", @in.Position, @in.Length, dirtyLength);
                }
                ++sequenceNum;
                return(true);
            }
Ejemplo n.º 2
0
            internal virtual bool ReadSequence()
            {
                if (@in.Eof())
                {
                    WordNum = int.MaxValue;
                    return(false);
                }
                int token = @in.ReadByte() & 0xFF;

                if ((token & (1 << 7)) == 0)
                {
                    int cleanLength = ReadCleanLength(@in, token);
                    WordNum += cleanLength;
                }
                else
                {
                    AllOnesLength = ReadCleanLength(@in, token);
                }
                DirtyLength = ReadDirtyLength(@in, token);
                Debug.Assert(@in.Length() - @in.Position >= DirtyLength, @in.Position + " " + @in.Length() + " " + DirtyLength);
                ++SequenceNum;
                return(true);
            }