public static void Save(BinaryWriter Output, IIEncoder64 coder)
{
var type = coder.GetType ();
byte idType = 255;
for (byte i = 0; i < Catalog.Count; i++) {
if (type == Catalog [i]) {
idType = i;
break;
}
}
if (idType == 255) {
var s = String.Format ("Type {0} is not a recognized IIEncoder64, please add it to " +
"IntegerEncoderGenericIO.Catalog", type);
throw new ArgumentException (s);
}
Output.Write (idType);
coder.Save (Output);
}