adding new python code: stringCompression - does basic string compression