我在C语言中维护一个复杂结构树。结构如下。现在我想要一些库或源代码,它们可以允许我从/向File保存和检索这个复杂结构的二叉树。非常感谢您的帮助。
typedef struct rb_red_blk_node {
int isdataNode; /* if isdataNode=0 then the node is not the one carrying data */
int red; /* if red=0 then the node is black */
int Maxnodecount;
// For hash nodes only.
off_t heighestnodeleftsubtree;
char* hash;
int filecounter;
//void* key;
// For datanodes nodes only.
off_t startkey; // Starting bytes of file.
off_t endkey; // Ending bytes of file.
char *filename;
void* info;
struct rb_red_blk_node* left;
struct rb_red_blk_node* right;
struct rb_red_blk_node* parent;
} rb_red_blk_node;