Beispiel #1
0
        public PartitionFileSystem(IStorage storage)
        {
            using (var reader = new BinaryReader(storage.AsStream(), Encoding.Default, true))
            {
                Header = new PartitionFileSystemHeader(reader);
            }

            HeaderSize  = Header.HeaderSize;
            Files       = Header.Files;
            FileDict    = Header.Files.ToDictionary(x => x.Name, x => x);
            BaseStorage = storage;
        }
Beispiel #2
0
        public BucketTree(IStorage data)
        {
            var reader = new BinaryReader(data.AsStream());

            BucketOffsets = new BucketTreeBucket <OffsetEntry>(reader);

            Buckets = new BucketTreeBucket <T> [BucketOffsets.EntryCount];

            for (int i = 0; i < BucketOffsets.EntryCount; i++)
            {
                reader.BaseStream.Position = (i + 1) * BucketAlignment;
                Buckets[i] = new BucketTreeBucket <T>(reader);
            }
        }
 public IvfcHeader(IStorage storage) : this(new BinaryReader(storage.AsStream()))
 {
 }