public static ulong DecodeUInt64(byte[] buffer, ref int offset) { var value = Bits.ToUInt64(buffer, offset); offset += 8; return value; }