code: def put_log_raw(self, project, logstore, log_group, compress=None):
          
          body = log_group.SerializeToString()
          raw_body_size = len(body)
          headers = {'x-log-bodyrawsize': str(raw_body_size), 'Content-Type': 'application/x-protobuf'}
  
          if compress is None or compress:
              if lz4:
                  headers['x-log-compresstype'] = 'lz4'
                  body = lz_compresss(body)
              else:
                  headers['x-log-compresstype'] = 'deflate'
                  body = zlib.compress(body)
  
          params = {}
          resource = '/logstores/' + logstore + "/shards/lb"
  
          (resp, header) = self._send('POST', project, body, resource, params, headers)
  
          return PutLogsResponse(header, resp)
docs: Put logs to log service. using raw data in protobuf
  
          :type project: string
          :param project: the Project name
  
          :type logstore: string
          :param logstore: the logstore name
  
          :type log_group: LogGroup
          :param log_group: log group structure
  
          :type compress: boolean
          :param compress: compress or not, by default is True
  
          :return: PutLogsResponse
  
          :raise: LogException