i had some time so had a play. Another 20 symbol key packer
/* pack/unpack a key into 20 7-bit symbols which should convert to 20 LSD-compatible UTF-8 bytes
borrows the carry method found in Key2Packed from the forum Scripting Library
i havent tested this at all with LSD, but should be ok according to the LSD docs to date (January 2023)
public domain
*/
string Key2Lsd(string k)
{ // encode high to low
string result;
integer carry;
integer i;
i had a go at doing this optimally. Optimal meaning within the log2 space of decodeable LSD chars, which at this time (January 2023) is 19 chars
this version is not compatible with the above 20 char version
/* pack/unpack a key into 19 7-bit symbols which should convert to 19 LSD-compatible UTF-8 bytes
borrows the carry method found in Key2Packed from the forum Scripting Library
as wrote it allows a TAB char to be optionally appended, for 20 symbols
appending TAB prevents cr