Crate libdivsufsort_rs

source
Expand description

§libdivsufsort-rs

libdivsufsort-rs is rust wrapper of libdivsufsort
Including all APIs of both 32- and 64-bit version.

  • More details are in included in original C codes of libdivsufsort
  • I referred to pzip-bwt crate, which is more simpler version for wrapping around bwt function of libdivsufsort

Functions§

  • “Constructs the burrows-wheeler transformed string of a given string and suffix array.”
    Input: Vector of bytes & its suffix array
    A input vector is transformed to burrows wheeler transformed string
    Output: Primary index(usually $ sign) of burrows wheeler transformed string
  • 64-bit version of bw_transform
  • “Constructs the burrows-wheeler transformed string of a given string.”
    Input: Vector of bytes
    A input vector is transformed to burrows wheeler transformed string
    Output: Primary index(usually $ sign) of burrows wheeler transformed string
  • 64-bit version of divbwt
  • “Constructs the suffix array of a given string.”
    Input: Vector of bytes
    Output: Suffix array
  • 64-bit version of [divsufsort]
  • 64-bit version of divsufsort_version
  • “Returns the version of the divsufsort library.”
  • “Inverse BW-transforms a given BWTed string.”
    Input: Vector of bytes(burrows wheeler transformed) & its primary index
    A input vector is transformed to original string
    Output: If no error occured, get Some value of unit. Otherwise, None.
  • 64-bit version of inverse_bw_transform
  • “Search for the pattern P in the string T.”
    Input: Vector of bytes & its suffix array and vector of pattern string.
    Output: tuple of index of suffix array for matched pattern and pattern count
    Even with multiple counts, only one index is output.
  • 64-bit version of sa_search
  • “Search for the character c in the string T.”
    Input: Vector of bytes & its suffix array and i32 encoded character.
    example of i32 encoding:
  • 64-bit version of sa_simplesearch
  • “Checks the correctness of a given suffix array.”
    Input: Vector of bytes & its suffix array & verbose option
    If verbose is true, additional information is printed to stdout.
    Output: If no error occured, get Some value of unit. Otherwise, None.
  • 64-bit version of sufcheck