private static AddIntegerCount ( IList |
||
buffer | IList |
The buffer to add the integer count to. |
count | int | A count value to write. |
return | void |
private static void AddIntegerCount(IList<byte> buffer, int count)
{
byte[] countBuffer = GetIntegerBytes(count);
// According to my inspection of the output of Property List Editor's .plist files,
// it is marking the most significant bit for some unknown reason. So we're marking it too.
buffer.Add((byte)((byte)Math.Log(countBuffer.Length, 2) | (byte)0x10));
foreach (byte countByte in countBuffer)
{
buffer.Add(countByte);
}
}