puristaa
Puristaa (Finnish for compress)
Provide a memory neutral and fast implementation that is clear to understand and works for the use case of extracting a common prefix of a sequence of strings and yielding that prefix and a generator for the compressed strings of the original sequence.
The latter is not yet clear. One simple implementation path is to receive a reference to a sequence, determine min-max, compare min to max by character and break with first index of enumaeration not matching. Finally yield first the prefix, subsequently all strings of the sequence each shortened by the prefix.
Another still open question is, if a composition of functions can be construed, such that the prefix finding algorithm respects a caller provided policy representing the inner structure of the strings. An example for an inner structure is a sequence of paths as strings. A path policy would provide a separator that modifies the prefix finding algorithm to backtrack to the previous such separator token.
why? well, imagine the sequence 'bar/baz', 'bar/bazaar' and a path policy providing the boolean predicate lambda x: x == '/' should not yield 'bar/baz', '', 'aar' but instead 'bar/', 'baz', 'bazaar'.
Documentation
User and developer documentation of puristaa.
Bug Tracker
Feature requests and bug reports are bested entered in the todos of puristaa.
Primary Source repository
The primary source repository of puristaa is at sourcehut a collection of tools useful for software development.
Status
Experimental
Note: The default branch is default.
Use
Commandline API
Release files for puristaa 2022.7.24
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| puristaa-2022.7.24.tar.gz | 12.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| puristaa-2022.7.24-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 19.0 kB
Release files / puristaa-2022.7.24.tar.gz
| Download URL | puristaa-2022.7.24.tar.gz |
|---|---|
| Size | 12.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d725f70704417e154272dd79c3299fdc4d4c85102f0d8acf22aa32ee5c7fbf8b
|
|
BLAKE2b-256 checksum How to use checksums |
e7da3be47f75c09131d2871fb7a069115df6fb1d01aa9b12620fbdccbc28bd8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / puristaa-2022.7.24-py2.py3-none-any.whl
| Download URL | puristaa-2022.7.24-py2.py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
43afcb8d559c7c039ea172a57cb70669226c7e277a0de672809f1949ccd5a9fe
|
|
BLAKE2b-256 checksum How to use checksums |
3136347c7efc014c3f85eca62e51576a746880e518b0c893624217f80f73f165
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|