diff --git a/lrzip.c b/lrzip.c index 6dda1cb..68b57d5 100644 --- a/lrzip.c +++ b/lrzip.c @@ -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"); diff --git a/stream.c b/stream.c index 723f947..1eda96a 100644 --- a/stream.c +++ b/stream.c @@ -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);