summaryrefslogtreecommitdiff
path: root/c,cc/gz.c
blob: a0dcd90c7d299f2eeef4315bfefb824d3a9e5ec2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <zlib.h>
#include <string.h>

int
main(void)
{
  gzFile gz = gzopen("asdf.gz", "wb");
  int len = 0;
  gzwrite(gz, "asdf\n", len);
  char *s = "asdf\n";
  gzwrite(gz, "asdf\n", strlen(s));
  gzclose(gz);

  return 0;
}