public static BplusTreeBytes ReOpen(System.IO.Stream treefile, System.IO.Stream blockfile) { BplusTreeLong tree = BplusTreeLong.SetupFromExistingStream(treefile); LinkedFile archive = LinkedFile.SetupFromExistingStream(blockfile); return(new BplusTreeBytes(tree, archive)); }
public static BplusTreeBytes Initialize(System.IO.Stream treefile, System.IO.Stream blockfile, int keyLength, int cultureId, int nodesize, int buffersize) { BplusTreeLong tree = BplusTreeLong.InitializeInStream(treefile, keyLength, nodesize, cultureId); LinkedFile archive = LinkedFile.InitializeLinkedFileInStream(blockfile, buffersize); return(new BplusTreeBytes(tree, archive)); }
public static LinkedFile SetupFromExistingStream(System.IO.Stream fromfile, long StartSeek) { LinkedFile result = new LinkedFile(100, StartSeek); // dummy buffer size for now result.fromfile = fromfile; result.ReadHeader(); result.buffers = BufferFile.SetupFromExistingStream(fromfile, StartSeek + result.headersize); return(result); }
public static LinkedFile InitializeLinkedFileInStream(System.IO.Stream fromfile, int buffersize, long startSeek) { LinkedFile result = new LinkedFile(buffersize, startSeek); result.fromfile = fromfile; result.SetHeader(); // buffersize should be increased by overhead... result.buffers = BufferFile.InitializeBufferFileInStream(fromfile, buffersize + BUFFEROVERHEAD, startSeek + result.headersize); return(result); }
public BplusTreeBytes(BplusTreeLong tree, LinkedFile archive) { this.tree = tree; this.archive = archive; }