简体   繁体   English

PST 文件中使用的这个“BTree”变体是什么?

[英]What is this "BTree" variant being used in PST files?

I've been working on parsing PST files with the help of https://www.five-ten-sg.com/libpst/rn01re06.html and https://blogs.msdn.microsoft.com/openspecification/2010/11/30/ms-pst-how-to-navigate-the-node-btree/ where they refer to it as a BTree, but it doesn't seem to follow the rules I can find for regular BTrees.我一直在https://www.five-ten-sg.com/libpst/rn01re06.htmlhttps://blogs.msdn.microsoft.com/openspecification/2010/11的帮助下解析 PST 文件/30/ms-pst-how-to-navigate-the-node-btree/他们将其称为 BTree,但它似乎不遵循我可以为常规 BTree 找到的规则。

I've mapped it so I can show it visually我已经映射了它,所以我可以直观地显示它

BTree之类的东西

Basically its made up of nodes that contain children (up to 20) and those are the same structure and so on until the leaf nodes, which are different, but the internal nodes aren't used for any actual data storing and seem to (sometimes) share the keys of the the first node in their children.基本上它由包含子节点(最多 20 个)的节点组成,这些节点的结构相同,依此类推,直到叶节点不同,但内部节点不用于任何实际数据存储,并且似乎(有时) ) 共享其子节点中第一个节点的密钥。

I'm asking because I'm trying to find out common ways of inserting, deleting, searching this data but regular BTree algorithms like on https://www.geeksforgeeks.org/b-tree-set-1-introduction-2/ aren't working since this data doesn't seem to be structured in exactly the same way.我问是因为我试图找出插入、删除、搜索这些数据的常用方法,但使用常规的 BTree 算法,例如https://www.geeksforgeeks.org/b-tree-set-1-introduction-2/不起作用,因为这些数据的结构似乎并不完全相同。

I've modified the search algorithm to traverse the current children in reverse until I find a child with an ID less than or equal to the one I'm searching for, and then look at that nodes children, which is working great but I'd rather not reinvent the wheel here and miss things if I don't have to.我已经修改了搜索算法以反向遍历当前的孩子,直到我找到一个 ID 小于或等于我正在搜索的孩子,然后查看该节点的孩子,这很好用,但我如果我不需要的话,我宁愿不要在这里重新发明轮子,也不要错过一些东西。

Here is a different display which I think shows more clearly that this is a standard B-Tree.这是一个不同的显示,我认为它更清楚地表明这是一个标准的 B 树。 The B-Tree index (Node or Block index) in the intermediate node is the index of the lowest leaf under the node;中间节点中的 B-Tree 索引(Node 或 Block 索引)是该节点下最低叶的索引; a Node or Block index can hence be found easily.因此可以轻松找到节点或块索引。 (Disclaimer - this image was generated from a tool I developed .) (免责声明 - 此图像是由 我开发工具生成的。)

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM