Esempio n. 1
0
        public static ArdBlockFile headerConstructor(List <Byte> rawHeader)
        {
            ArdBlockFile ardBlockFile = new ArdBlockFile();

            ardBlockFile.Header = rawHeader;
            return(ardBlockFile);
        }
Esempio n. 2
0
        private void processData(List <byte> rawData)
        {
            Blocks = new ObservableCollection <ArdBlockFile>();

            int currentOffset = 0;

            Header         = rawData.GetRange(0, headerSize);
            currentOffset += headerSize;

            Console.WriteLine("DEBUG >>> Found " + BlockCount + " blocks");
            // Blocks
            foreach (var i in Enumerable.Range(0, (int)BlockCount))
            {
                // Blocks only read up to their size, so no need to pass only their data
                ArdBlockFile currentBlock = new ArdBlockFile(rawData.GetRange(currentOffset, rawData.Count - currentOffset));
                Blocks.Add(currentBlock);
                currentOffset += currentBlock.getAsByteList().Count;
            }
        }