Esempio n. 1
0
        public static void WritePackedULong(this DataStreamWriter writer, ulong value, NetworkCompressionModel compression)
        {
            var union = new ULongUIntUnion {
                LongValue = value
            };

            writer.WritePackedUInt(union.Int0Value, compression);
            writer.WritePackedUInt(union.Int1Value, compression);
        }
Esempio n. 2
0
        public static ulong ReadPackedULongDelta(this DataStreamReader reader, ref DataStreamReader.Context ctx, ulong baseline, NetworkCompressionModel compression)
        {
            var baselineUnion = new ULongUIntUnion {
                LongValue = baseline
            };

            var i1 = reader.ReadPackedUIntDelta(ref ctx, baselineUnion.Int0Value, compression);
            var i2 = reader.ReadPackedUIntDelta(ref ctx, baselineUnion.Int1Value, compression);

            return(new ULongUIntUnion {
                Int0Value = i1, Int1Value = i2
            }.LongValue);
        }