code: def add_compression(self, compression=True):
          
          if self.model not in compressionsupport:
              self._unsupported("Trying to set compression on a printer that doesn't support it")
              return
          self._compression = compression
          self.data += b'\x4D' # M
          self.data += bytes([compression << 1])
docs: Add an instruction enabling or disabling compression for the transmitted raster image lines.
          Not all models support compression. If the specific model doesn't support it but this method
          is called trying to enable it, either a warning is set or an exception is raised depending on
          the value of :py:attr:`exception_on_warning`
  
          :param bool compression: Whether compression should be on or off