private static bool ReadPickle(BinaryReader reader, out long result) {
if (reader.ReadByte() != 128 || reader.ReadByte() != 3) {
result = 0;
return false;
}
switch (reader.ReadByte()) {
case (byte)'F':
result = (long)reader.ReadSingle();
return true;
case (byte)'N':
result = 0;
return true;
case (byte)'I':
case (byte)'J':
result = reader.ReadInt32();
return true;
case (byte)'L':
result = reader.ReadInt64();
return true;
case (byte)'M':
result = reader.ReadUInt16();
return true;
case (byte)'K':
result = reader.ReadByte();
return true;
}
result = 0;
return false;
}