I have a bitset of binary data that I wish to encode compactly as an ASCII string. I intend to initially compress the data using run-length encoding to give a sequence of integers; e.g.
111110001000000000000111
becomes:
5o3z1o12z3o
(e.g. 5 ones, 3 zeros, 1 one, 12 zeros, 3 ones).
However, I wish to then compress this further into a compact ASCII string (i.e. a string using the full range of ASCII characters rather than the digits plus 'o' and 'z'). Can anyone recommend a suitable approach and / or 3rd party library to do this in Java?