Skip to main content

Linux/UNIX/*NIX strings command, in Cython

Project description

nixstrings

Linux/UNIX/*NIX strings command, in Cython

Over the years I've found many programs in digital forensics need this kind of functionality, some do it by piping strings with a subprocess, others use regexes, others implement a listcomp of their own.

Of those, usually the regex is the fastest, but it turns out you can actually go a bit faster with the help of C(ython).

This module has specialized functions that compile the comparisson of characters values to get the results as fast as possible. On synthethic benchmarks, the ascii_strings() function is almost 5x faster than the equivalent regex (that would berx = re.compile(f'[{ascii_printables}]{{4,}}') and then rx.findall(data)), but on real case scenarios it's usually just 2x faster before I/O becomes the main bottleneck.

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

nixstrings-0.3.0.tar.gz (28.7 kB view hashes)

Uploaded Source

Built Distributions

nixstrings-0.3.0-py3.10-win-amd64.egg (14.1 kB view hashes)

Uploaded Source

nixstrings-0.3.0-py3.10-win32.egg (13.0 kB view hashes)

Uploaded Source

nixstrings-0.3.0-py3.10-macosx-10.15-x86_64.egg (12.3 kB view hashes)

Uploaded Source

nixstrings-0.3.0-py3.9-win-amd64.egg (14.1 kB view hashes)

Uploaded Source

nixstrings-0.3.0-py3.9-win32.egg (13.0 kB view hashes)

Uploaded Source

nixstrings-0.3.0-py3.9-macosx-10.15-x86_64.egg (12.3 kB view hashes)

Uploaded Source

nixstrings-0.3.0-py3.8-win-amd64.egg (14.1 kB view hashes)

Uploaded Source

nixstrings-0.3.0-py3.8-win32.egg (13.0 kB view hashes)

Uploaded Source

nixstrings-0.3.0-py3.8-macosx-10.15-x86_64.egg (12.3 kB view hashes)

Uploaded Source

nixstrings-0.3.0-py3.7-win-amd64.egg (14.1 kB view hashes)

Uploaded Source

nixstrings-0.3.0-py3.7-win32.egg (12.9 kB view hashes)

Uploaded Source

nixstrings-0.3.0-py3.7-macosx-10.15-x86_64.egg (12.2 kB view hashes)

Uploaded Source

nixstrings-0.3.0-cp310-cp310-win_amd64.whl (14.1 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

nixstrings-0.3.0-cp310-cp310-win32.whl (13.0 kB view hashes)

Uploaded CPython 3.10 Windows x86

nixstrings-0.3.0-cp310-cp310-macosx_10_15_x86_64.whl (12.3 kB view hashes)

Uploaded CPython 3.10 macOS 10.15+ x86-64

nixstrings-0.3.0-cp39-cp39-win_amd64.whl (14.1 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

nixstrings-0.3.0-cp39-cp39-win32.whl (13.0 kB view hashes)

Uploaded CPython 3.9 Windows x86

nixstrings-0.3.0-cp39-cp39-macosx_10_15_x86_64.whl (12.3 kB view hashes)

Uploaded CPython 3.9 macOS 10.15+ x86-64

nixstrings-0.3.0-cp38-cp38-win_amd64.whl (14.1 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

nixstrings-0.3.0-cp38-cp38-win32.whl (13.0 kB view hashes)

Uploaded CPython 3.8 Windows x86

nixstrings-0.3.0-cp38-cp38-macosx_10_15_x86_64.whl (12.3 kB view hashes)

Uploaded CPython 3.8 macOS 10.15+ x86-64

nixstrings-0.3.0-cp37-cp37m-win_amd64.whl (14.1 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

nixstrings-0.3.0-cp37-cp37m-win32.whl (12.9 kB view hashes)

Uploaded CPython 3.7m Windows x86

nixstrings-0.3.0-cp37-cp37m-macosx_10_15_x86_64.whl (12.3 kB view hashes)

Uploaded CPython 3.7m macOS 10.15+ x86-64

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