The EncodeInt method for example is implemented like this:
void EncodeInt(ScriptBitSerializer packet)
{
int val; this.SerializeBytes(val, 4); packet.Serialize(val, 32);
}
This means that the data cannot be decoded using packet.SerializeInt(x) but must instead be decoded with packet.Serialize( x ,32)
which caused me some trouble figuring out, and is hard to guess based on method names.