Proposal Details
The index/suffixarray
package builds an internal slice of sorted suffix offsets but does not expose it. Without access to the raw offsets, users can only perform lookups and cannot, for example, compute an LCP array, visualize the suffix ordering, or drive custom algorithms on top of the raw suffix indices.
Internally, Index uses a private
type ints struct {
i32 []int32
i64 []int64
}
My suggestion is adding two methods:
func (x *Index) SuffixArray32() []int32
func (x *Index) SuffixArray64() []int64
And the user can operate over the internal data however they like.