public static byte[] SerializeByteCount(ByteCount[] byteCounts)
{
var result = new byte[byteCounts.Length * 4];
int bitPos = 0;
foreach (var byteCount in byteCounts)
{
Utils.AddInt(result, ref bitPos, byteCount.Byte, 8);
Utils.AddInt(result, ref bitPos, byteCount.Count, 24);
}
return result;
}