This is pure golang btree library. it's copy on write btree.
go get github.com/datastream/btree
create a record
create a btree
LEAFSIZE = 1 << 5
NODESIZE = 1 << 6
create new btree with custom leafsize/nodesize
Insert a record, if insert success, it return nil
Update a record, if update success, it return nil
Delete a record, if delete success, it return nil
Search a key, if find success, it return value, nil
Write btree data into disk.
tree.Dump("treedump")
Read btree from disk
- more test
- code tunning for performance or mem