+
+#ifdef HAVE_ZLIB
+ if (i < 0)
+ goto readerror;
+ if (i == 0 && !pipein)
+ goto endoftape;
+
+ if (zflag && i != ntrec * TP_BSIZE) {
+ tpb = (struct tapebuf *) tapebuf;
+ if (i != tpb->clen + sizeof(struct tapebuf))
+ errx(1,"tape is not a compressed dump tape");
+ worklen = comprlen;
+ cresult = uncompress(comprbuf, &worklen, tpb->buf, tpb->clen);
+ if (cresult != Z_OK)
+ errx(1,"tape is not a compressed dump tape");
+ if (worklen != tpb->unclen)
+ errx(1,"decompression error, length mismatch");
+ i = worklen;
+ tbufptr = comprbuf;
+ }
+#endif /* HAVE_ZLIB */
+