The simple answer: No - without losing the nature of the "printed line"
Typically, PNG already uses sophisticated compression, such as it is used in ZIP files. Therefore, compression before applying base64 encoding will give you a very limited reduction in size.
Applying compression after base64 encoding will again lead to binary data - in this case, you can simply skip the base64 encoding step.
Robert
source share