if (gzwrite(file, (const voidp)hello, (unsigned)len) != len) { fprintf(stderr, "gzwrite err: %s\n", gzerror(file, &err));
gzputc(file, 'h'); if (gzputs(file, "ello") != 4) { fprintf(stderr, "gzputs err: %s\n", gzerror(file, &err)); exit(1);
void test_gzio(out, in, uncompr, uncomprLen)    const char *out; /* output file */    const char *in;  /* input file */    Byte *uncompr;    int  uncomprLen;{    int err;    int len = strlen(hello)+1;    gzFile file;    file = gzopen(out, "wb");    if (file == NULL) {        fprintf(stderr, "gzopen error\n");        exit(1);    }    if (gzwrite(file, (const voidp)hello, (unsigned)len) != len) {        fprintf(stderr, "gzwrite err: %s\n", gzerror(file, &err));    }    gzclose(file);    file = gzopen(in, "rb");    if (file == NULL) {        fprintf(stderr, "gzopen error\n");    }    strcpy((char*)uncompr, "garbage");    uncomprLen = gzread(file, uncompr, (unsigned)uncomprLen);    if (uncomprLen != len) {        fprintf(stderr, "gzread err: %s\n", gzerror(file, &err));    }    gzclose(file);    if (strcmp((char*)uncompr, hello)) {        fprintf(stderr, "bad gzread\n");    } else {        printf("gzread(): %s\n", uncompr);    }}