I have a software generating reports and sending those by mail. The reports contain some plain text, to directly be readable by some mail-client, and different attachments in formats like CSV, HTML, JSON and XML. Especially the HTML is pretty large, as it embeds CSS including images and some JavaScript to make reports interactively usable in the browser. While CSS, images and JS are compressed/minified already, tests show that the HTML-attachments could be compressed using ZIP to about the half of their size.
Of course I don't want to send some ZIP containing the HTML. Instead, users should only need to store the attachment itself or, depending on the mail-client, simply double-click the HTML-attachment to get that opened in the browser. For this to work, one needs to store compressed data within the mail already, so that clients can decompress as necessary. Pretty much like one can store Base64 encoded text and clients decode that, only that one would need HTML -> compression -> Base64 or something like that.
Is there a Content-Transfer-Encoding
available to store compressed textual content and which is widely supported by clients? Maybe a combination of Content-Type
and Content-Transfer-Encoding
?