4 stable releases

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

#638 in Data structures

Download history 689/week @ 2022-08-13 701/week @ 2022-08-20 543/week @ 2022-08-27 509/week @ 2022-09-03 776/week @ 2022-09-10 456/week @ 2022-09-17 634/week @ 2022-09-24 482/week @ 2022-10-01 560/week @ 2022-10-08 753/week @ 2022-10-15 626/week @ 2022-10-22 908/week @ 2022-10-29 1188/week @ 2022-11-05 1316/week @ 2022-11-12 743/week @ 2022-11-19 629/week @ 2022-11-26

4,017 downloads per month
Used in 5 crates (4 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