FreakySources.Code.AsciimationDataGenerator.SerializeByteCount C# (CSharp) Method

SerializeByteCount() public static method

public static SerializeByteCount ( ByteCount byteCounts ) : byte[]
byteCounts ByteCount
return byte[]
        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;
        }