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

Generator-based Streaming Encoder and Decoder interfaces #10

Open saxbophone opened 8 years ago

saxbophone commented 8 years ago

These would most likely replace the core encoder and decoder functions and would function in some way that would allow partial output of an encoded or decoded stream once it has received enough input.

E.g. say an encoding ratio of 4 to 5 symbols is being used, then the encoding generator would output two symbols after receiving two input symbols, as two symbols' input from a ratio of 4 is enough to calculate the values of two symbols' output for a ratio of 5.

This would have a potential speed efficiency improvement for encoding and decoding streams of data, and the other more traditional encode() and decode() functions could piggy-back on its functionality and just return the result as a list when done.

saxbophone commented 6 years ago

I don't think what I was originally proposing in this issue is possible (that is, stream encoding symbol-by-symbol), however it certainly is possible on a chunk-by-chunk basis, so I am going to change this issue to implement this instead.

saxbophone commented 5 years ago

Blocked on #27