public static uint?ReadCompressedNullableUInt(this IReadBytes stream) { if (!stream.ReadCompressedBool()) { return(null); } return(stream.ReadCompressedUInt()); }
public static byte[] ReadCompressedByteArray(this IReadBytes stream) { if (!stream.ReadCompressedBool()) { return(null); } var length = (int)stream.ReadCompressedUInt(); return(stream.ReadBytes(length)); }
public static MonthStamp ReadCompressedMonthStamp(this IReadBytes stream) { var value = (int)stream.ReadCompressedUInt(); return(new MonthStamp(value / 12, (value % 12) + 1)); }
public static int ReadCompressedInt(this IReadBytes input) { var value = input.ReadCompressedUInt(); return((int)((value >> 1) ^ (~(value & 1) + 1))); }
public static DateStamp ReadCompressedDateStamp(this IReadBytes stream) { var value = (int)stream.ReadCompressedUInt(); return(new DateStamp(value / 100 / 12, (value / 100 % 12) + 1, value % 100)); }