Using SQLite3 in Python, I am trying to store a compressed version of a snippet of UTF-8 HTML code.
Code looks like this:
... c = connection.cursor()
You could store the value using repr(html) instead of the raw output and then use eval(html) when retrieving the value for use.
c.execute('insert or ignore into blah values (?, ?)',(1, repr(zlib.compress(html))))