in reply to How to efficently pack a string of 63 characters

One can assume a random distribution of characters from Alphabet A = {A, B, C}

Uniformly random? If they follow another distribution (e.g. if A is more likely than B) you can get an advantage.

Investigating the distribution of A,B,C can be insightful in deciding whether 6 bits for RL coding is too much. I can see that you get long sequences like AAAAAAAAAAAAA which can utilise a lot of RL bits, but what's the percentage of unused RL bits? For which characters?

3^63 = 1144561273430837494885949696427 are all these combinations equally likely? Or even possible? If not, you can get an advantage.

Your data is similar to gene sequences for which compression is a problem. See Compression_of_genomic_sequencing_data for ideas.

bw, bliako