Suffix tree implementation library 1.2 review
DownloadSuffix tree implementation library is a C library, an implementation of the suffix trees algorithm to store/retrieve key/data pairs.
|
|
Suffix tree implementation library is a C library, an implementation of the suffix trees algorithm to store/retrieve key/data pairs.
The main advantages are a linear indexing time, little memory usage, and very fast retrieving.
It has been developped on FreeBSD/gcc but should be fairly portable.
The source code "testsfx.c" show an example of how to use the library both for inserting, retrieving, and deleting data. There aren't many functions and comments should be enough to give you an idea of how to use the library. (read the header of the source file)
You should edit sfxdisk.h to suit your needs: you can change the alphabet size and the offset type. It should be OK to use "long long" 64 bits ints instead of long, in fact I tested it succesfully but haven't gone to the point of filling more than 2 GB of data (needless to say you need a 64 bits filesystem).
Two "tools" come with the library (new with version 1.2): dumpsfx and loadsfx. dumpsfx is used to dump the database: dumpsfx [-s separator] if you want to output the result as readable text or dumpsfx < file.sfx > -h to output it for reloading with loadsfx.
dumpsfx outputs on stdout and loadsfx reads from stdin. loadsfx < suffix tree file to create > < dumped_file
What's New in This Release:
removed an useless offset incrementation in STwritenode
Suffix tree implementation library 1.2 search tags