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; }
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())) { }