Basic String Encoding X

I am looking for a procedure that will encode a string (stream of bytes) into an arbitrary base / alphabet (e.g. base64 encoding, but I can choose the alphabet). I saw several routines that use basic X encoding for a number, but not for a string.

+3
source share
2 answers

There is my implementation of the BaseX (BaseN) coding algorithm: https://github.com/KvanTTT/BaseNcoding .

You can also experiment with different alphabets and parameters on the demo site: http://kvanttt.imtqy.com/BaseNcoding/

+2
source

, ( ) , divmod , mod div .

+1

Source: https://habr.com/ru/post/1750579/


All Articles