saxbophone / basest-python

Arbitrary base binary-to-text encoder (any base to any base), in Python.
https://pypi.org/project/basest/
Mozilla Public License 2.0
6 stars 0 forks source link

Add version of best_ratio() that searches based on range of output chunk sizes #52

Open saxbophone opened 4 years ago

saxbophone commented 4 years ago

Currently, basest.core.best_ratio() only allows a range of input chunk sizes to be given. This is inconvenient if the constraints are on the actual size of output chunk (say we want to know how many base-N symbols we can fit in 1KiB of space for instance).

Thus, an optional feature should be added allowing the output chunk size range to be specified instead.

It might also be possible to supply constraints for both input and output chunk sizes, but not sure how feasible this is.