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 true.
Update a record, if update success, it return true
Delete a record, if delete success, it return true
Search a key, if find success, it return value
Write btree data into disk.
# tree.Version = 100
tree.Dump("treedump")
# filename should be "treedump_100"
Read btree from disk
- more test
- code tunning for performance or mem