public Aes128CtrExStorage(IStorage baseStorage, IStorage bucketTreeData, byte[] key, byte[] counter, bool leaveOpen) : base(baseStorage, key, counter, leaveOpen) { BucketTree = new BucketTree <AesSubsectionEntry>(bucketTreeData); SubsectionEntries = BucketTree.GetEntryList(); SubsectionOffsets = SubsectionEntries.Select(x => x.Offset).ToList(); }
public IndirectStorage(IStorage bucketTreeData, bool leaveOpen, params IStorage[] sources) { Sources.AddRange(sources); LeaveOpen = leaveOpen; BucketTree = new BucketTree <RelocationEntry>(bucketTreeData); RelocationEntries = BucketTree.GetEntryList(); RelocationOffsets = RelocationEntries.Select(x => x.Offset).ToList(); Length = BucketTree.BucketOffsets.OffsetEnd; }
public Result Initialize(BucketTree tree) { Assert.AssertTrue(tree != null); Assert.AssertTrue(Tree == null || tree == Tree); if (Entry == null) { Entry = ArrayPool <byte> .Shared.Rent((int)tree.EntrySize); Tree = tree; EntryIndex = -1; } return(Result.Success); }
public static long QueryEntryStorageSize(int entryCount) => BucketTree.QueryEntryStorageSize(NodeSize, Unsafe.SizeOf <Entry>(), entryCount);
public static long QueryHeaderStorageSize() => BucketTree.QueryHeaderStorageSize();