mirror of
https://github.com/ckolivas/lrzip.git
synced 2026-02-17 12:54:14 +01:00
Ignore the eof flag if the file size is known.
This commit is contained in:
parent
b17540d32e
commit
f2ddd9022c
4
runzip.c
4
runzip.c
|
|
@ -265,11 +265,11 @@ i64 runzip_fd(rzip_control *control, int fd_in, int fd_out, int fd_hist, i64 exp
|
|||
md5_init_ctx (&control->ctx);
|
||||
gettimeofday(&start,NULL);
|
||||
|
||||
while (total < expected_size || !total || !control->eof) {
|
||||
do {
|
||||
total += runzip_chunk(control, fd_in, fd_out, fd_hist, expected_size, total);
|
||||
if (STDOUT)
|
||||
dump_tmpoutfile(control, fd_out);
|
||||
}
|
||||
} while (total < expected_size || (!expected_size && !control->eof));
|
||||
|
||||
gettimeofday(&end,NULL);
|
||||
print_progress("\nAverage DeCompression Speed: %6.3fMB/s\n",
|
||||
|
|
|
|||
2
rzip.c
2
rzip.c
|
|
@ -964,8 +964,6 @@ retry:
|
|||
/* st->chunk_size may be shrunk in rzip_chunk */
|
||||
last_chunk = st->chunk_size;
|
||||
len -= st->chunk_size;
|
||||
if (!len)
|
||||
control->eof = 1;
|
||||
}
|
||||
|
||||
close_streamout_threads(control);
|
||||
|
|
|
|||
2
stream.c
2
stream.c
|
|
@ -962,7 +962,7 @@ void *open_stream_in(rzip_control *control, int f, int n)
|
|||
|
||||
if (control->major_version == 0 && control->minor_version > 5) {
|
||||
/* Read in flag that tells us if there are more chunks after
|
||||
* this */
|
||||
* this. Ignored if we know the final file size */
|
||||
if (unlikely(read_u8(f, &control->eof))) {
|
||||
print_err("Failed to read eof flag in open_stream_in\n");
|
||||
goto failed;
|
||||
|
|
|
|||
Loading…
Reference in a new issue