'Compress the text data.'

def get_prep_value(self, value):

    if (value is not None):
        if isinstance(value, unicode):
            value = value.encode('utf8')
        value = compress_string(value)
        value = value.encode('base64').decode('utf8')
    return value
