I installed libdivsufsort and ran following example program: https://github.com/y-256/libdivsufsort/?tab=readme-ov-file#example-usage
And I got following result: $ cc test-libdivsufsort.c -I/usr/local/include -L/usr/local/lib -ldivsufsort $ ./a.out SA[ 0] = 10: a$ SA[ 1] = 7: abra$ SA[ 2] = 0: abracadabra$ SA[ 3] = 3: acadabra$ SA[ 4] = 5: adabra$ SA[ 5] = 8: bra$ SA[ 6] = 1: bracadabra$ SA[ 7] = 4: cadabra$ SA[ 8] = 6: dabra$ SA[ 9] = 9: ra$ SA[10] = 2: racadabra$ $ ok asou@ -- ASOU Masato On Fri, Dec 20, 2024 at 4:39 AM Alexander Bluhm <bl...@openbsd.org> wrote: > > Hi, > > I need the libdivsufsort library to build the NIST SP 800-90B tools. > Unfortunately libdivsufsort did not tag their latest release in June > 2015, so I have to use the git commit hash. > > ok to import? > > Comment: > library for lightweight suffix array construction algorithm > > Description: > This library provides a simple and an efficient C API to construct a > suffix array and a Burrows-Wheeler transformed string from a given > string over a constant-size alphabet. The algorithm runs in O(n log n) > worst-case time using only 5n+O(1) bytes of memory space, where n is the > length of the string. > > bluhm