public Pfs(IStorage storage) { using (var reader = new BinaryReader(storage.AsStream(), Encoding.Default, true)) { Header = new PfsHeader(reader); } HeaderSize = Header.HeaderSize; Files = Header.Files; FileDict = Header.Files.ToDictionary(x => x.Name, x => x); BaseStorage = storage; }
public Pfs(Stream stream) { using (var reader = new BinaryReader(stream, Encoding.Default, true)) { Header = new PfsHeader(reader); } HeaderSize = Header.HeaderSize; Files = Header.Files; FileDict = Header.Files.ToDictionary(x => x.Name, x => x); StreamSource = new SharedStreamSource(stream); }