warcsum/warcsum.c
/* Process WARC header and extract: URI, Date */
Process WARC header and extract: URI, Date
Process WARC header and extract : URI Date
int
process_header (z_stream *z, void* vp)
{
  struct warcsum_struct *mm = (struct warcsum_struct*) vp;
  int warc_header_length = 0;
  int http_header_length = 0;
  warc_header_length = process_warcheader (z, vp);
  if (warc_header_length == -1)
    {
      return -1;
    }
  if (mm->effective_out - z->avail_out > warc_header_length)
    {
      http_header_length = process_httpheader (z, vp, warc_header_length);
    }
  if (http_header_length + warc_header_length
      == mm->effective_out - z->avail_out)
    {
      mm->need_double = 1;
      return -1;
    }
  else
    {
      return http_header_length + warc_header_length;
    }
}
int process_header ( z_stream * z , void * vp ) { struct warcsum_struct * mm = ( struct warcsum_struct * ) vp ; int warc_header_length = 0 ; int http_header_length = 0 ; warc_header_length = process_warcheader ( z , vp ) ; if ( warc_header_length == -1 ) { return -1 ; } if ( mm -> effective_out - z -> avail_out > warc_header_length ) { http_header_length = process_httpheader ( z , vp , warc_header_length ) ; } if ( http_header_length + warc_header_length == mm -> effective_out - z -> avail_out ) { mm -> need_double = 1 ; return -1 ; } else { return http_header_length + warc_header_length ; } }
Process WARC header and extract: URI, Date
Process WARC header and extract : URI Date