added expected_throughput.pl
[tridge/junkcode.git] / gz.c
1 #include <stdio.h>
2 #include "zlib.h"
3
4 int main(void)
5 {
6         gzFile *g = gzdopen(1, "w");
7         char buf[1024];
8         int n;
9
10         while ((n=read(0, buf, sizeof(buf))) > 0) {
11                 gzwrite(g, buf, n);
12         }
13         gzclose(g);
14         return 0;
15 }