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 oflibdivsufsort
- I referred to
pzip-bwt
crate, which is more simpler version for wrapping around bwt function oflibdivsufsort
Functions§
- bw_
transform - “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 - bw_
transform64 - 64-bit version of bw_transform
- divbwt
- “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 - divbwt64
- 64-bit version of divbwt
- divsufsort
- “Constructs the suffix array of a given string.”
Input: Vector of bytes
Output: Suffix array - divsufsort64
- 64-bit version of divsufsort
- divsufsort64_
version - 64-bit version of divsufsort_version
- divsufsort_
version - “Returns the version of the divsufsort library.”
- inverse_
bw_ transform - “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 ofunit
. Otherwise,None
. - inverse_
bw_ transform64 - 64-bit version of inverse_bw_transform
- sa_
search - “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. - sa_
search64 - 64-bit version of sa_search
- sa_
simplesearch - “Search for the character c in the string T.”
Input: Vector of bytes & its suffix array andi32
encoded character.
example ofi32
encoding: - sa_
simplesearch64 - 64-bit version of sa_simplesearch
- sufcheck
- “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 ofunit
. Otherwise,None
. - sufcheck64
- 64-bit version of sufcheck