#ifndef lint
static const char rcsid[] =
- "$Id: main.c,v 1.37 2001/03/20 10:02:48 stelian Exp $";
+ "$Id: main.c,v 1.38 2001/03/20 20:15:43 stelian Exp $";
#endif /* not lint */
#include <config.h>
long blocksperfile; /* output blocks per file */
char *host = NULL; /* remote host (if any) */
int sizest = 0; /* return size estimate only */
-int compressed = 0; /* use zlib to compress the output */
+int compressed = 0; /* use zlib to compress the output, compress level 1-9 */
long long bytes_written = 0; /* total bytes written */
long uncomprblks = 0;/* uncompressed blocks written */
#endif
"Mns:ST:uWw"
#ifdef HAVE_ZLIB
- "z"
+ "z::"
#endif
)) != -1)
#undef optstring
exit(X_FINOK); /* do nothing else */
#ifdef HAVE_ZLIB
case 'z':
- compressed = 1;
+ compressed = 2;
+ if (optarg)
+ compressed = numarg("compress level", 1L, 9L);
break;
#endif /* HAVE_ZLIB */
msg("Label: %s\n", spcl.c_label);
+ if (compressed)
+ msg("Compressing output at compression level %d\n", compressed);
+
#if defined(SIGINFO)
(void)signal(SIGINFO, statussig);
#endif
long tapekb = bytes_written / 1024;
double rate = .0005 + (double) spcl.c_tapea / tapekb;
msg("Wrote %ldKB uncompressed, %ldKB compressed,"
- " compression ratio %1.3f\n",
+ " %1.3f:1\n",
spcl.c_tapea, tapekb, rate);
}
#ifdef HAVE_ZLIB
"z"
#endif
- "] [-B records] [-b blocksize] [-d density]\n"
- "\t%s [-e inode#] [-f file] [-h level] [-s feet] [-T date] filesystem\n"
- "\t%s [-W | -w]\n", __progname, white, __progname);
+ "] [-B records] [-b blocksize]\n"
+ "\t%s [-d density] [-e inode#] [-f file] [-h level] [-s feet]\n"
+ "\t%s [-T date] [-z zlevel] filesystem\n"
+ "\t%s [-W | -w]\n",
+ __progname, white, white, __progname);
exit(X_STARTUP);
}