📄 readme
字号:
+------------------------------------------------+| Suffix tree implementation library version 1.2 |+------------------------------------------------+Fabien Menemenlis 2001-07-19nihilist@dead-inside.orgThis archive contains an implementation of a fast indexing library based onsuffix trees. It features the basic functions you can expect from this kindof library: storing, retrieving, deleting and dumping/loading the database.All work is done on disk except for a custom cache used to save a fewread/writes on nodes and thus requires fast disks but little memory.A performance of about 500 inserts per second has been achieved on an arrayof 3 * 18 GB 10000 rpm SCSI disks. Indexing time is also linear and lookup isextremely fast (requires only n + 2 disk access at most when looking up aword of n letters).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 bothfor inserting, retrieving, and deleting data. There aren't many functions andcomments 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 sizeand the offset type. It should be OK to use "long long" 64 bits ints insteadof long, in fact I tested it succesfully but haven't gone to the point offilling 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 <suffix tree file> [-s separator]if you want to output the result as readable text ordumpsfx <file.sfx> -hto output it for reloading with loadsfx.dumpsfx outputs on stdout and loadsfx reads from stdin.loadsfx <suffix tree file to create> < dumped_filePlease note that deleting does "free" any space for future inserts, dumpingand reloading the database is necessary to retrieve freed space. This couldchange in the future.There are still a few french variables names, sorry about that, I'll translatethem for the next release.There's still room for improvement... like partial key lookup. Contribute ifyou can!Any feedback will be greatly appreciated, mail me at nihilist@dead-inside.orgThe library is provided under the GPL license. See COPYING file for more info.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -