Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
LICENSE
README

README

# FFI::Stree

This library provides a wrapper for the 'generic suffix tree library' (libstree) using FFI.

    libstree is a generic suffix tree implementation, written in C.
    It can handle arbitrary data structures as elements of a string.
    Unlike most demo implementations, it is not limited to simple
    ASCII character strings. Suffix tree generation in libstree is
    highly efficient and implemented using the algorithm by Ukkonen.
    -- http://www.icir.org/christian/libstree/


## Installation

    gem install ffi-stree

No compilation is required.

You will need to have libstree installed in order to actually use the library.

    osc:     port install libstree
    arch:    yaourt -S --aur foobar
    debian:  apt-get install libstree


## FFI::Stree Sample

    require 'ffi-stree'

    tree = FFI::Stree::Tree.new
    tree << 'yokatt'
    tree << 'nemukatt'

    p @tree.longest_common_substring(0,10)
    # => ["katt"]


## License

FFI::Stree is distributed under MIT license.
Something went wrong with that request. Please try again.