qntm/base32768

How to differentiate between `0011(111)` being decoded at the end of a stream and `00(11111)`?

Closed this issue · 2 comments

s5bug commented

I'm writing a port that works on bit streams instead of bytes and I have a problem when I'm not using 15*n +? 7 bits; decoding the string leads to an ambiguity. How can I solve this?

qntm commented

I'm not sure I fully understand the question. Can you give an example of a Base32768 string which has ambiguous decoding? It would also be helpful if you provided an example input binary which encodes to that Base32768 string.

s5bug commented

@qntm The problem comes from me using bits and not bytes, sorry; I should have closed this a while ago myself. This algorithm is not intended for bits