Calculate the total expected size progressively and show it when it's not known.

This commit is contained in:
Con Kolivas 2011-03-14 13:32:36 +11:00
parent dc360b52dc
commit 5f7a03932b
2 changed files with 4 additions and 1 deletions

View file

@ -520,7 +520,9 @@ void decompress_file(rzip_control *control)
print_progress("\r");
if (!(STDOUT | TEST_ONLY))
print_output("Output filename is: %s: ", control->outfile);
print_progress("[OK] - %lld bytes \n", expected_size);
if (!expected_size)
expected_size = control->st_size;
print_progress("[OK] - %lld bytes \n", expected_size);
if (unlikely(close(fd_hist) || close(fd_out)))
fatal("Failed to close files\n");

View file

@ -988,6 +988,7 @@ void *open_stream_in(rzip_control *control, int f, int n)
goto failed;
}
print_maxverbose("Chunk size: %lld\n", sinfo->size);
control->st_size += sinfo->size;
}
sinfo->initial_pos = lseek(f, 0, SEEK_CUR);