I probably looked like a dummy.
I'm not familiar with compression/encryption routines, so I'm iffy about modifying them. However, I did apply your change, and found OTHER bugs in this code.

I wonder if this code was even tested before it was put out there? It stops when it encounters a space also.

Perhaps someone could point me to a better compression function??