summaryrefslogtreecommitdiffstats
path: root/decompress.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 15:39:57 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 15:39:57 +0000
commit231e63aa0df4768b134f65c272a33c6a123a36bb (patch)
treeaf4d9cab220d8e7056a5e8394ed23a01632fca17 /decompress.cc
parentAdding debian version 1.2-3. (diff)
downloadplzip-231e63aa0df4768b134f65c272a33c6a123a36bb.tar.xz
plzip-231e63aa0df4768b134f65c272a33c6a123a36bb.zip
Merging upstream version 1.3~pre1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r--decompress.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/decompress.cc b/decompress.cc
index cdcc7af..6dc7afe 100644
--- a/decompress.cc
+++ b/decompress.cc
@@ -196,20 +196,21 @@ extern "C" void * dworker( void * arg )
// start the workers and wait for them to finish.
int decompress( int num_workers, const int infd, const int outfd,
const Pretty_print & pp, const int debug_level,
- const bool testing, const bool infd_isreg )
+ const bool infd_isreg )
{
if( !infd_isreg )
- return dec_stream( num_workers, infd, outfd, pp, debug_level, testing );
+ return dec_stream( num_workers, infd, outfd, pp, debug_level );
const File_index file_index( infd );
if( file_index.retval() == 1 )
{
lseek( infd, 0, SEEK_SET );
- return dec_stream( num_workers, infd, outfd, pp, debug_level, testing );
+ return dec_stream( num_workers, infd, outfd, pp, debug_level );
}
if( file_index.retval() != 0 )
{ pp( file_index.error().c_str() ); return file_index.retval(); }
+ show_header( file_index.dictionary_size( 0 ) );
if( num_workers > file_index.members() )
num_workers = file_index.members();
@@ -255,11 +256,11 @@ int decompress( int num_workers, const int infd, const int outfd,
(double)out_size / in_size,
( 8.0 * in_size ) / out_size,
100.0 * ( 1.0 - ( (double)in_size / out_size ) ) );
- if( verbosity >= 3 )
+ if( verbosity >= 4 )
std::fprintf( stderr, "decompressed size %9llu, size %9llu. ",
out_size, in_size );
- if( verbosity >= 1 ) std::fprintf( stderr, testing ? "ok\n" : "done\n" );
+ if( verbosity >= 1 ) std::fprintf( stderr, (outfd < 0) ? "ok\n" : "done\n" );
return 0;
}