Page History: NUB
Compare Page Revisions
Page Revision: 2009/01/28 23:25
NUB is a collection of high performance codes that are common to many projects (particularly applicable to game programming). Currently providing indexes for variable-length keys, compressed resource files, and an istream interface for blocks of memory.
A Note on NUB Index Files
Nub indexes target storing ASCIIZ variable-length keys to resource files in a
highly efficient manner. Because of this requirement, nub indexes are not
B-trees but very similar. There is no preset "order" to the trees. B-trees are
a variant of M-way branching trees. NUB indexes are not of any particular
order M. Instead, each node packs in as many keys as will fit. There are no codes
to balance the tree during insert and delete so a tree can become badly
unbalanced. To compensate for this, I am working on a function Index::pack() which will balance the tree and optimize it for fastest access. This would be used once your resource file is complete (prior to release). I should warn you that for very large indexes this function takes a good bit of time.
History
NUB grew out of a start on the Johnny Bashful project. Unfortunately, independent development takes too long these days. The project died for lack of my time to spend on it. It may get resurrected some day. The NUB project is currently undergoing refinement. Support for Unicode keys plus huge index and resource files (64-bit) coming soon. Index::pack() is next on the list. I have made one attempt at it, but it resulted in fast but large indexes in some cases.