mirror of
https://github.com/ckolivas/lrzip.git
synced 2025-12-06 07:12:00 +01:00
Change -q to only silence progress as per documentation.
This commit is contained in:
parent
ec926c62b2
commit
1974d68407
16
lrzip.c
16
lrzip.c
|
|
@ -314,7 +314,7 @@ int open_tmpoutfile(rzip_control *control)
|
||||||
|
|
||||||
fd_out = mkstemp(control->outfile);
|
fd_out = mkstemp(control->outfile);
|
||||||
if (fd_out == -1) {
|
if (fd_out == -1) {
|
||||||
print_progress("WARNING: Failed to create out tmpfile: %s, will fail if cannot perform %scompression entirely in ram\n",
|
print_output("WARNING: Failed to create out tmpfile: %s, will fail if cannot perform %scompression entirely in ram\n",
|
||||||
control->outfile, DECOMPRESS ? "de" : "");
|
control->outfile, DECOMPRESS ? "de" : "");
|
||||||
} else
|
} else
|
||||||
register_outfile(control, control->outfile, TEST_ONLY || STDOUT || !KEEP_BROKEN);
|
register_outfile(control, control->outfile, TEST_ONLY || STDOUT || !KEEP_BROKEN);
|
||||||
|
|
@ -478,7 +478,7 @@ int open_tmpinfile(rzip_control *control)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fd_in == -1) {
|
if (fd_in == -1) {
|
||||||
print_progress("WARNING: Failed to create in tmpfile: %s, will fail if cannot perform %scompression entirely in ram\n",
|
print_output("WARNING: Failed to create in tmpfile: %s, will fail if cannot perform %scompression entirely in ram\n",
|
||||||
control->infile, DECOMPRESS ? "de" : "");
|
control->infile, DECOMPRESS ? "de" : "");
|
||||||
} else {
|
} else {
|
||||||
register_infile(control, control->infile, (DECOMPRESS || TEST_ONLY) && STDIN);
|
register_infile(control, control->infile, (DECOMPRESS || TEST_ONLY) && STDIN);
|
||||||
|
|
@ -774,7 +774,7 @@ bool decompress_file(rzip_control *control)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!STDOUT)
|
if (!STDOUT)
|
||||||
print_progress("Output filename is: %s\n", control->outfile);
|
print_output("Output filename is: %s\n", control->outfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( IS_FROM_FILE ) {
|
if ( IS_FROM_FILE ) {
|
||||||
|
|
@ -871,7 +871,7 @@ bool decompress_file(rzip_control *control)
|
||||||
if (unlikely(!get_hash(control, 0)))
|
if (unlikely(!get_hash(control, 0)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
print_progress("Decompressing...\n");
|
print_output("Decompressing...\n");
|
||||||
|
|
||||||
if (unlikely(runzip_fd(control, fd_in, fd_hist, expected_size) < 0)) {
|
if (unlikely(runzip_fd(control, fd_in, fd_hist, expected_size) < 0)) {
|
||||||
clear_rulist(control);
|
clear_rulist(control);
|
||||||
|
|
@ -885,13 +885,13 @@ bool decompress_file(rzip_control *control)
|
||||||
/* if we get here, no fatal_return(( errors during decompression */
|
/* if we get here, no fatal_return(( errors during decompression */
|
||||||
print_progress("\r");
|
print_progress("\r");
|
||||||
if (!(STDOUT | TEST_ONLY))
|
if (!(STDOUT | TEST_ONLY))
|
||||||
print_progress("Output filename is: %s: ", control->outfile);
|
print_output("Output filename is: %s: ", control->outfile);
|
||||||
if (!expected_size)
|
if (!expected_size)
|
||||||
expected_size = control->st_size;
|
expected_size = control->st_size;
|
||||||
if (!ENCRYPT)
|
if (!ENCRYPT)
|
||||||
print_progress("[OK] - %lld bytes \n", expected_size);
|
print_output("[OK] - %lld bytes \n", expected_size);
|
||||||
else
|
else
|
||||||
print_progress("[OK] \n");
|
print_output("[OK] \n");
|
||||||
|
|
||||||
if (TMP_OUTBUF)
|
if (TMP_OUTBUF)
|
||||||
close_tmpoutbuf(control);
|
close_tmpoutbuf(control);
|
||||||
|
|
@ -1310,7 +1310,7 @@ bool compress_file(rzip_control *control)
|
||||||
} else
|
} else
|
||||||
strcpy(control->outfile, tmpinfile);
|
strcpy(control->outfile, tmpinfile);
|
||||||
strcat(control->outfile, control->suffix);
|
strcat(control->outfile, control->suffix);
|
||||||
print_progress("Output filename is: %s\n", control->outfile);
|
print_output("Output filename is: %s\n", control->outfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
fd_out = open(control->outfile, O_RDWR | O_CREAT | O_EXCL, 0666);
|
fd_out = open(control->outfile, O_RDWR | O_CREAT | O_EXCL, 0666);
|
||||||
|
|
|
||||||
2
main.c
2
main.c
|
|
@ -723,7 +723,7 @@ recursion:
|
||||||
minutes = (int)(total_time / 60) % 60;
|
minutes = (int)(total_time / 60) % 60;
|
||||||
seconds = total_time - hours * 3600 - minutes * 60;
|
seconds = total_time - hours * 3600 - minutes * 60;
|
||||||
if (!INFO)
|
if (!INFO)
|
||||||
print_progress("Total time: %02d:%02d:%05.2f\n", hours, minutes, seconds);
|
print_output("Total time: %02d:%02d:%05.2f\n", hours, minutes, seconds);
|
||||||
if (recurse)
|
if (recurse)
|
||||||
goto recursion;
|
goto recursion;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
runzip.c
2
runzip.c
|
|
@ -412,7 +412,7 @@ i64 runzip_fd(rzip_control *control, int fd_in, int fd_hist, i64 expected_size)
|
||||||
tdiff = end.tv_sec - start.tv_sec;
|
tdiff = end.tv_sec - start.tv_sec;
|
||||||
if (!tdiff)
|
if (!tdiff)
|
||||||
tdiff = 1;
|
tdiff = 1;
|
||||||
print_progress("\nAverage DeCompression Speed: %6.3fMB/s\n",
|
print_output("\nAverage DeCompression Speed: %6.3fMB/s\n",
|
||||||
(total / 1024 / 1024) / tdiff);
|
(total / 1024 / 1024) / tdiff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
4
rzip.c
4
rzip.c
|
|
@ -1247,8 +1247,8 @@ retry:
|
||||||
(1.0 + st->stats.match_bytes) / st->stats.literal_bytes);
|
(1.0 + st->stats.match_bytes) / st->stats.literal_bytes);
|
||||||
|
|
||||||
if (!STDIN)
|
if (!STDIN)
|
||||||
print_progress("%s - ", control->infile);
|
print_output("%s - ", control->infile);
|
||||||
print_progress("Compression Ratio: %.3f. Average Compression Speed: %6.3fMB/s.\n",
|
print_output("Compression Ratio: %.3f. Average Compression Speed: %6.3fMB/s.\n",
|
||||||
1.0 * s.st_size / s2.st_size, chunkmbs);
|
1.0 * s.st_size / s2.st_size, chunkmbs);
|
||||||
|
|
||||||
clear_sslist(st);
|
clear_sslist(st);
|
||||||
|
|
|
||||||
2
stream.c
2
stream.c
|
|
@ -1677,7 +1677,7 @@ fill_another:
|
||||||
fsync(control->fd_out);
|
fsync(control->fd_out);
|
||||||
|
|
||||||
if (unlikely(u_len > control->maxram))
|
if (unlikely(u_len > control->maxram))
|
||||||
print_progress("Warning, attempting to malloc very large buffer for this environment of size %lld\n", u_len);
|
print_output("Warning, attempting to malloc very large buffer for this environment of size %lld\n", u_len);
|
||||||
max_len = MAX(u_len, MIN_SIZE);
|
max_len = MAX(u_len, MIN_SIZE);
|
||||||
max_len = MAX(max_len, c_len);
|
max_len = MAX(max_len, c_len);
|
||||||
s_buf = malloc(max_len);
|
s_buf = malloc(max_len);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue