Skip to main content

Python bindings for libdivsufsort

Project description

divsufsort-python

Python bindings for libdivsufsort.

Getting Started

Install from pip.

pip install divsufsort

Import the module and call its divsufsort function.

>>> from divsufsort import divsufsort
>>> divsufsort(b'The quick brown fox jumps over the lazy dog')
(9, 39, 15, 19, 34, 25, 3, 30, 0, 36, 10, 7, 40, 33, 2, 28, 16, 42, 32, 1, 6,
20, 8, 35, 22, 14, 41, 26, 12, 17, 23, 4, 29, 11, 24, 31, 5, 21, 27, 13, 18,
38, 37)

The function receives a bytes-like object, b, and returns the corresponding suffix-array, that is a tuple of integers r such that len(r) == len(b) and b[r[i]:] < b[r[i+1]:] for all i.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

divsufsort-1.0.1.tar.gz (15.5 kB view hashes)

Uploaded Source

Built Distributions

divsufsort-1.0.1-cp39-cp39-win_amd64.whl (22.8 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

divsufsort-1.0.1-cp39-cp39-win32.whl (20.0 kB view hashes)

Uploaded CPython 3.9 Windows x86

divsufsort-1.0.1-cp38-cp38-win_amd64.whl (22.8 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

divsufsort-1.0.1-cp38-cp38-win32.whl (20.1 kB view hashes)

Uploaded CPython 3.8 Windows x86

divsufsort-1.0.1-cp37-cp37m-win_amd64.whl (22.8 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

divsufsort-1.0.1-cp37-cp37m-win32.whl (20.0 kB view hashes)

Uploaded CPython 3.7m Windows x86

divsufsort-1.0.1-cp36-cp36m-win_amd64.whl (22.8 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

divsufsort-1.0.1-cp36-cp36m-win32.whl (20.0 kB view hashes)

Uploaded CPython 3.6m Windows x86

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page