Пример #1
0
        /// <summary>
        /// Reads the next signed VINT from a stream, cuts the leading 1, reads the correct value.
        /// </summary>
        public static long ReadSignedValue(Stream reader)
        {
            long value = ReadTag(reader);

            return(value - (3L << (QMath.BitsAfterMSB(value) - 1)) + 1);
        }
Пример #2
0
        /// <summary>
        /// Reads the next VINT from a stream, cuts the leading 1, reads the correct value.
        /// </summary>
        public static long ReadValue(Stream reader)
        {
            long value = ReadTag(reader);

            return(value - (1L << QMath.BitsAfterMSB(value)));
        }