views:

4151

answers:

6

I am looking for a lean and well constructed open source implementation of a B-tree library written in C. It needs to be under a non-GPL license so that it can be used in a commercial application. Ideally, this library supports the B-tree index to be stored/manipulated as a disk file so that large trees can be built using a configurable (ie: minimal) RAM footprint.

Note: Since there seemed to be some confusion, a Binary Tree and a B-Tree are not the same thing.

A: 

This page seems to be a good resource.

Eric Z Beard
This link refers to Binary Trees, not B-Tree's.
Tall Jeff
+5  A: 

The author of the SQLite implementation has disclaimed copyright. If LGPL is okay, then maybe you could use GNUpdate's implementation?

A. Rex
Made this the chosen answer for now. It is a good pointer, but still looking for something more cleanly implemented and abstracted into well encapsulated and maintainable module.
Tall Jeff
+3  A: 

If LGPL is ok, then Tokyo Cabinet might fit the bill. LGPL allows linking with a non-Free application, without adding any constraints on the distribution of the final product.

florin
A: 

Maybe you can considere the berkeley db. It is using a b-tree internally.

bill
+1  A: 

I came across this - The WB B-Tree Database for SCM, Java, C#, and C that's a GNU package.

le dorfier
+1  A: 

Attractive Chaos implement kbtree.h. It's a efficient B-tree library

Lear