open_in_new
content_copy
import gzip s_in = b"Lots of content here" s_out = gzip.compress(s_in)