|
|
@ -55,6 +55,7 @@ int main(int argc, char **argv) {
|
|
|
|
uint32_t level = LZMA_PRESET_DEFAULT;
|
|
|
|
uint32_t level = LZMA_PRESET_DEFAULT;
|
|
|
|
bool tar = true;
|
|
|
|
bool tar = true;
|
|
|
|
bool keep_input = false;
|
|
|
|
bool keep_input = false;
|
|
|
|
|
|
|
|
bool extreme = false;
|
|
|
|
pixz_op_t op = OP_WRITE;
|
|
|
|
pixz_op_t op = OP_WRITE;
|
|
|
|
char *ipath = NULL, *opath = NULL;
|
|
|
|
char *ipath = NULL, *opath = NULL;
|
|
|
|
|
|
|
|
|
|
|
@ -72,7 +73,7 @@ int main(int argc, char **argv) {
|
|
|
|
case 't': tar = false; break;
|
|
|
|
case 't': tar = false; break;
|
|
|
|
case 'k': keep_input = true; break;
|
|
|
|
case 'k': keep_input = true; break;
|
|
|
|
case 'h': usage(NULL); break;
|
|
|
|
case 'h': usage(NULL); break;
|
|
|
|
case 'e': level |= LZMA_PRESET_EXTREME; break;
|
|
|
|
case 'e': extreme = true; break;
|
|
|
|
case 'f':
|
|
|
|
case 'f':
|
|
|
|
optdbl = strtod(optarg, &optend);
|
|
|
|
optdbl = strtod(optarg, &optend);
|
|
|
|
if (*optend || optdbl <= 0)
|
|
|
|
if (*optend || optdbl <= 0)
|
|
|
@ -133,6 +134,8 @@ int main(int argc, char **argv) {
|
|
|
|
case OP_WRITE:
|
|
|
|
case OP_WRITE:
|
|
|
|
if (isatty(fileno(gOutFile)) == 1)
|
|
|
|
if (isatty(fileno(gOutFile)) == 1)
|
|
|
|
usage("Refusing to output to a TTY");
|
|
|
|
usage("Refusing to output to a TTY");
|
|
|
|
|
|
|
|
if (extreme)
|
|
|
|
|
|
|
|
level |= LZMA_PRESET_EXTREME;
|
|
|
|
pixz_write(tar, level);
|
|
|
|
pixz_write(tar, level);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case OP_READ: pixz_read(tar, 0, NULL); break;
|
|
|
|
case OP_READ: pixz_read(tar, 0, NULL); break;
|
|
|
|