Insert compressed string to blob column mysql

Hi,

I have a table in mysql with a blob column
and I am using zlib to deflate a long string in ruby code
what is the correct way to insert this compressed string to this blob
column?
I have exception with quotes while inserting as a string

regards,