Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Read7BitEncodedInt64()

long System.IO.BinaryReader.Read7BitEncodedInt64 ( )
inlineinherited

Definition at line 543 of file BinaryReader.cs.

544 {
545 ulong num = 0uL;
546 byte b;
547 for (int i = 0; i < 63; i += 7)
548 {
549 b = ReadByte();
550 num |= ((ulong)b & 0x7FuL) << i;
551 if ((uint)b <= 127u)
552 {
553 return (long)num;
554 }
555 }
556 b = ReadByte();
557 if ((uint)b > 1u)
558 {
559 throw new FormatException(SR.Format_Bad7BitInt);
560 }
561 return (long)(num | ((ulong)b << 63));
562 }
virtual byte ReadByte()

References System.SR.Format_Bad7BitInt, and System.IO.BinaryReader.ReadByte().