コード例 #1
0
 public int LoadAllChunkData(Stream stream, ChunkLocationList locations)
 {
     for (int i = 0; i < 1024; i++)
     {
         if (locations[i].SectorCount > 0)
         {
             this[i] = new ChunkData(stream, locations[i]);
         }
     }
     return(0);
 }
コード例 #2
0
        public void WriteAllChunkData(Stream stream, ChunkLocationList locations)
        {
            for (int i = 0; i < 1024; i++)
            {
                if (!locations[i].IsCreatedChunk)
                {
                    continue;
                }

                stream.Seek(locations[i].Offset * 4096, SeekOrigin.Begin);
                stream.Write(this[i].ToByteArray(), 0, this[i].UseSectorSize * 4096);
            }
        }