public static long DecodeLong(UnicodeUtils.CharFlow seq) { long number = DecodeUnsigned(seq); long result = number / 2; if (number % 2 != 0) { result = -result; } return(result); }
public static int Decode(UnicodeUtils.CharFlow seq) { int number = DecodeUnsigned(seq); int result = number / 2; if (number % 2 != 0) { result = -result; } return(result); }
public static long DecodeUnsignedLong(UnicodeUtils.CharFlow seq) { long number = 0; long pos = 1; bool hasMore; do { int digit = DecodeDigit(seq.characters[seq.pointer++]); hasMore = digit % 2 == 1; number += pos * (digit / 2); pos *= 46; } while (hasMore); return(number); }