4 stable releases

2.0.0 Nov 23, 2019
1.0.2 Nov 17, 2019
1.0.0 Nov 16, 2019

#1322 in Algorithms

Download history 87/week @ 2024-03-14 123/week @ 2024-03-21 85/week @ 2024-03-28 92/week @ 2024-04-04 155/week @ 2024-04-11 150/week @ 2024-04-18 339/week @ 2024-04-25 254/week @ 2024-05-02 407/week @ 2024-05-09 422/week @ 2024-05-16 261/week @ 2024-05-23 431/week @ 2024-05-30 396/week @ 2024-06-06 435/week @ 2024-06-13 295/week @ 2024-06-20 354/week @ 2024-06-27

1,598 downloads per month
Used in 6 crates (5 directly)

MIT license

425KB
3.5K SLoC

divsufsort

This crate contains a Rust handmade port of Yuta Mori's libdivsufsort, as found on:

Changes

The main changes from the C codebase are as follows.

Instead of passing pointers to T (the original text) and SA (the suffix array), slices and indices are passed instead. This sometimes involves adding more parameters to functions (like tr_heapsort).

Some macros (for stacks, used in sssort and trsort) have been replaced with proper Rust types. The SAPtr type is used to represent an index into SA. A/B/B* access has also been translated from C macros to Rust (inlined) functions.

Cross-checking is only built when the crosscheck feature is enabled. It is not intended for general use, only for debugging the divsufsort crate.

Authors

The original C code was written by Yuta Mori.

The port was done by hand, by Amos Wenger.

License

divsufsort is released under the MIT license, same as the original.

See the LICENSE file for details.

Dependencies