Пример #1
0
        public static void WriteUnsignedInt(ITransport trans, int i)
        {
            while ((i & ~0x7F) != 0)
            {
                trans.GetBinaryWriter().Write((byte)((i & 0x7f) | 0x80));

                i = (int)((uint)i >> 7);

            }

            trans.GetBinaryWriter().Write((byte)i);

            if (logger.IsTraceEnabled)
                logger.Trace(String.Format("Unsigned byte written : " + i));
        }