Example #1
0
        public static void WriteInt64(long value, MsgPackStream stream)
        {
            if (value >= 0)
            {
                WriteUInt64(unchecked ((ulong)value), stream);
                return;
            }

            if (value >= int.MinValue)
            {
                WriteInt32(unchecked ((int)value), stream);
                return;
            }

            stream.WriteUInt8(FormatCode.Int64);
            stream.WriteInt64(value);
        }