I do something similar, embed large compressed data blocks as Lua string literals in some project, and I've just given up and used
lua_string_literal = string.format("%q", compressor(data))
I don't know if that's available in Cobalt, but for standard Lua I like the compromise, it's not /that/ wasteful.