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

DeserializeByteCount() public static method

public static DeserializeByteCount ( byte ar ) : FreakySources.Code.ByteCount[]
ar byte
return FreakySources.Code.ByteCount[]
        public static ByteCount[] DeserializeByteCount(byte[] ar)
        {
            var result = new ByteCount[ar.Length / 4];
            int ind = 0;
            int bitPos = 0;
            for (int i = 0; i < ar.Length; i += 4)
            {
                result[ind++] = new ByteCount
                {
                    Byte = (byte)Utils.GetInt(ar, ref bitPos, 8),
                    Count = Utils.GetInt(ar, ref bitPos, 24)
                };
            }
            return result;
        }